File tree Expand file tree Collapse file tree 7 files changed +51
-15
lines changed Expand file tree Collapse file tree 7 files changed +51
-15
lines changed Original file line number Diff line number Diff line change 22bugfixes :
33 - " icingaweb2: run pqslcmd with LANG=C to ensure the output is in english."
44 - remove superfluous curly brace (#246)
5+ - Added block rescue statement if unsupported os found. (#232)
56minor_changes :
67 - added tests for icingaweb2 ini template
78 - added pyinilint as ini validator after templates
Original file line number Diff line number Diff line change 11---
2+ - name : Check supported operatingsystems
3+ block :
4+ - name : Install on {{ ansible_os_family }}
5+ ansible.builtin.include_tasks : " install_on_{{ ansible_os_family }}.yml"
6+ rescue :
7+ - name : " OS family not supported!"
8+ ansible.builtin.fail :
9+ msg : " The OS {{ ansible_os_family }} is not supported!"
210
3- - name : install on {{ ansible_os_family }}
4- include_tasks : " install_on_{{ ansible_os_family }}.yml"
5-
6- - name : fragments dir
7- file :
11+ - name : Prepare fragments path
12+ ansible.builtin.file :
813 state : directory
914 path : " {{ icinga2_fragments_path }}"
1015 owner : root
Original file line number Diff line number Diff line change 1212 paths :
1313 - " {{ role_path }}/vars"
1414
15- - name : Include OS specific installation
16- ansible.builtin.include_tasks : " install_on_{{ ansible_os_family | lower }}.yml"
15+ - name : Check supported operatingsystems
16+ block :
17+ - name : Include OS specific installation
18+ ansible.builtin.include_tasks : " install_on_{{ ansible_os_family | lower }}.yml"
19+ rescue :
20+ - name : " OS family not supported!"
21+ ansible.builtin.fail :
22+ msg : " The OS {{ ansible_os_family }} is not supported!"
1723
1824- name : Include Tasks to configure IcingaDB
1925 ansible.builtin.include_tasks : manage_config.yml
Original file line number Diff line number Diff line change 1212 paths :
1313 - " {{ role_path }}/vars"
1414
15- - name : Include OS specific installation
16- ansible.builtin.include_tasks : " install_on_{{ ansible_os_family | lower }}.yml"
15+ - name : Check supported operatingsystems
16+ block :
17+ - name : Include OS specific installation
18+ ansible.builtin.include_tasks : " install_on_{{ ansible_os_family | lower }}.yml"
19+ rescue :
20+ - name : " OS family not supported!"
21+ ansible.builtin.fail :
22+ msg : " The OS {{ ansible_os_family }} is not supported!"
1723
1824- name : Manage IcingaDB Redis configuration
1925 ansible.builtin.include_tasks : " manage_config.yml"
Original file line number Diff line number Diff line change 1818 loop : " {{ icingaweb2_modules | dict2items }}"
1919 when : icingaweb2_modules is defined and icingaweb2_module_packages[item.key] is defined and item.value.enabled | bool == true and item.value.source == "package"
2020
21- - name : Include OS specific installation
22- ansible.builtin.include_tasks : " install_on_{{ ansible_os_family | lower }}.yml"
21+ - name : Check supported operatingsystems
22+ block :
23+ - name : Include OS specific installation
24+ ansible.builtin.include_tasks : " install_on_{{ ansible_os_family | lower }}.yml"
25+ rescue :
26+ - name : " OS family not supported!"
27+ ansible.builtin.fail :
28+ msg : " The OS {{ ansible_os_family }} is not supported!"
2329
2430- name : Manage Icinga Web 2 config
2531 ansible.builtin.include_tasks : " manage_icingaweb_config.yml"
Original file line number Diff line number Diff line change 22
33- gather_facts :
44
5- - name : Include OS family specific vars
6- include_vars : " {{ role_path }}/vars/{{ ansible_os_family }}.yml"
5+ - name : Check supported operatingsystems
6+ block :
7+ - name : Include OS family specific vars
8+ ansible.builtin.include_vars : " {{ role_path }}/vars/{{ ansible_os_family }}.yml"
9+ rescue :
10+ - name : " OS family not supported!"
11+ ansible.builtin.fail :
12+ msg : " The OS {{ ansible_os_family }} is not supported!"
713
814- name : Include OS distribution/version specific vars
915 include_vars : " {{ lookup('first_found', params) }}"
Original file line number Diff line number Diff line change 2929 - icinga_repo_subscription_username is defined
3030 - icinga_repo_subscription_password is defined
3131
32- - name : Add repositories
33- ansible.builtin.include_tasks : " {{ ansible_os_family }}.yml"
32+ - name : Check OS family
33+ block :
34+ - name : Add repositories {{ ansible_os_family }}
35+ ansible.builtin.include_tasks : " {{ ansible_os_family }}.yml"
36+ rescue :
37+ - name : " OS family not supported!"
38+ ansible.builtin.fail :
39+ msg : " The OS '{{ ansible_os_family }}' isn't currently supported!"
You can’t perform that action at this time.
0 commit comments