1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-14 20:22:08 +00:00

Merge pull request #3567 from holta/sugarizer-bypass-32

If 32-bit OS, bypass Sugarizer & Explain during iiab-install
This commit is contained in:
A Holt 2023-05-03 17:33:55 -04:00 committed by GitHub
commit fe208879ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 4 deletions

View file

@ -40,10 +40,23 @@
name: pathagar
when: pathagar_install is defined and pathagar_install
# WARNING: Since March 2023, 32-bit RasPiOS can act as 64-bit on RPi 4 and
# RPi 400 (unlike RPi 3!) SEE: https://github.com/iiab/iiab/pull/3422 and #3516
- name: Run command 'dpkg --print-architecture' to identify OS architecture (CPU arch as revealed by ansible_architecture ~= ansible_machine is NO LONGER enough!)
command: dpkg --print-architecture
register: dpkg_arch
when: sugarizer_install
- name: Explain bypassing of Sugarizer install if 32-bit OS
fail: # FORCE IT RED THIS ONCE!
msg: "BYPASSING SUGARIZER INSTALL ATTEMPT, as Sugarizer Server 1.5.0 requires MongoDB 3.2+ which is NO LONGER SUPPORTED on 32-bit Raspberry Pi OS. 'dpkg --print-architecture' output for your OS: {{ dpkg_arch.stdout }}"
when: sugarizer_install and not dpkg_arch.stdout is search("64")
ignore_errors: True
- name: SUGARIZER
include_role:
name: sugarizer
when: sugarizer_install
when: sugarizer_install and dpkg_arch.stdout is search("64")
- name: Recording STAGE 7 HAS COMPLETED ========================
lineinfile:

View file

@ -37,7 +37,9 @@
- debug:
var: mongodb_version
- name: Run command 'dpkg --print-architecture' to identify OS architecture (CPU arch as revealed by ansible_architecture ~= ansible_machine is NOT enough!)
# WARNING: Since March 2023, 32-bit RasPiOS can act as 64-bit on RPi 4 and
# RPi 400 (unlike RPi 3!) SEE: https://github.com/iiab/iiab/pull/3422 and #3516
- name: Run command 'dpkg --print-architecture' to identify OS architecture (CPU arch as revealed by ansible_architecture ~= ansible_machine is NO LONGER enough!)
command: dpkg --print-architecture
register: dpkg_arch
- debug:
@ -45,10 +47,11 @@
- block:
- name: EXIT 'mongodb' ROLE, if 'dpkg --print-architecture' shows "armhf" or mongodb_version == "unsupported" or ansible_machine not found
- name: EXIT 'mongodb' ROLE, if 'dpkg --print-architecture' appears to be 32-bit (i.e. does not contain "64") or mongodb_version == "unsupported" or ansible_machine not found
fail: # FORCE IT RED THIS ONCE!
msg: MongoDB 3.2+ (as needed by Sugarizer Server 1.5.0) is NO LONGER SUPPORTED on 32-bit Raspberry Pi OS.
when: dpkg_arch.stdout == "armhf" or mongodb_version == "unsupported" or mongodb_version == "unknown"
when: not dpkg_arch.stdout is search("64") or mongodb_version == "unsupported" or mongodb_version == "unknown"
#when: dpkg_arch.stdout == "armhf" or mongodb_version == "unsupported" or mongodb_version == "unknown"
- name: Install MongoDB if 'mongodb_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml