1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Merge pull request #3255 from holta/skip_role_on_error

Prototype 'skip_role_on_error: True' in 4 roles {lokole, moodle, mongodb, sugarizer}
This commit is contained in:
A Holt 2022-06-18 11:48:00 -04:00 committed by GitHub
commit 83ea6ce852
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 155 additions and 115 deletions

View file

@ -21,7 +21,7 @@
- name: MOODLE
include_role:
name: moodle
when: moodle_install and not is_ubuntu_2204 and not is_ubuntu_2210 # TEMPORARY
when: moodle_install # and not is_ubuntu_2204 and not is_ubuntu_2210 # TEMPORARY
- name: OSM-VECTOR-MAPS
include_role:
@ -43,7 +43,7 @@
- name: SUGARIZER
include_role:
name: sugarizer
when: sugarizer_install and not is_ubuntu_2204 and not is_ubuntu_2210 # TEMPORARY
when: sugarizer_install # and not is_ubuntu_2204 and not is_ubuntu_2210 # TEMPORARY
- name: Recording STAGE 7 HAS COMPLETED ========================
lineinfile:

View file

@ -19,6 +19,8 @@
quiet: yes
- block:
- name: Install Lokole if lokole_installed is not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: lokole_installed is undefined
@ -69,3 +71,10 @@
value: "{{ lokole_url }}"
- option: lokole_full_url
value: "{{ lokole_full_url }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -44,17 +44,18 @@
# ELSE...
- block:
- name: Install MongoDB if 'mongodb_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: mongodb_installed is undefined
# when: mongodb_installed is undefined and not (ansible_architecture == "aarch64" and is_debian_10 and not is_raspbian)
- name: Enable or Disable MongoDB, if mongodb_installed is defined (sugarizer.service auto-starts MongoDB as nec, so doesn't need this or care what happens here!)
include_tasks: enable-or-disable.yml
when: mongodb_installed is defined
- name: Add 'mongodb' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
@ -70,3 +71,10 @@
value: "{{ mongodb_install }}"
- option: mongodb_enabled
value: "{{ mongodb_enabled }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -19,14 +19,14 @@
quiet: yes
- block:
- name: Install Moodle if 'moodle_installed' not defined, e.g. in {{ iiab_state_file }} # /etc/iiab/iiab_state.yml
include_tasks: install.yml
when: moodle_installed is undefined
- include_tasks: enable-or-disable.yml
- name: Add 'moodle' variable values to {{ iiab_ini_file }}
ini_file:
path: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
@ -44,3 +44,10 @@
value: "{{ moodle_enabled }}"
- option: moodle_base
value: "{{ moodle_base }}"
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -19,6 +19,8 @@
quiet: yes
- block:
# 3 stanzas moved up from install.yml, so Debian-or-any-OS-where-MongoDB-fails
# still finish their "LARGE-sized" IIAB install: (WITH LOUD RED WARNINGS!)
@ -35,11 +37,16 @@
name: mongodb
- name: EXIT 'sugarizer' ROLE & CONTINUE, IF 'mongodb_installed is undefined'
fail: # FORCE IT RED THIS ONCE!
msg: MongoDB INSTALLATION FAILED, perhaps because your OS is Debian 10 on aarch64? Nevertheless IIAB will continue (consider this a warning!)
# - name: EXIT 'sugarizer' ROLE & CONTINUE, IF 'mongodb_installed is undefined'
# fail: # FORCE IT RED THIS ONCE!
# msg: MongoDB INSTALLATION FAILED, perhaps because MongoDB doesn't yet support Ubuntu 22.04 with libssl3? Nevertheless IIAB will continue (consider this a warning!)
# when: mongodb_installed is undefined
# ignore_errors: yes # RESCUE (BELOW) NOW HANDLES THIS
- name: Verify that mongodb_installed is defined
fail:
msg: MongoDB INSTALLATION FAILED, perhaps because MongoDB doesn't yet support Ubuntu 22.04 with libssl3? #3190
when: mongodb_installed is undefined
ignore_errors: yes
# ELSE...
@ -55,3 +62,10 @@
# [MOVED TO main2.yml]
#
# when: mongodb_installed is defined # CONDITION FOR ENTIRE ABOVE block:
rescue:
- name: 'SEE ERROR ABOVE (skip_role_on_error: {{ skip_role_on_error }})'
fail:
msg: ""
when: not skip_role_on_error

View file

@ -16,6 +16,8 @@
iiab_base_ver: 8.0
iiab_revision: 0
skip_role_on_error: False
iiab_etc_path: /etc/iiab
# Main configuration file