|
10 | 10 | dest: "{{ icinga2_config_path + '/icinga2.conf' }}"
|
11 | 11 | owner: "{{ icinga2_user }}"
|
12 | 12 | group: "{{ icinga2_group }}"
|
13 |
| - notify: reload icinga2 service |
| 13 | + notify: check-and-reload-icinga2-service |
14 | 14 |
|
15 | 15 | - name: merge defaults and user specified constants (set_fact icinga2_combined_constants)
|
16 | 16 | set_fact:
|
|
22 | 22 | dest: "{{ icinga2_config_path + '/constants.conf' }}"
|
23 | 23 | owner: "{{ icinga2_user }}"
|
24 | 24 | group: "{{ icinga2_group }}"
|
25 |
| - notify: reload icinga2 service |
| 25 | + notify: check-and-reload-icinga2-service |
26 | 26 |
|
27 | 27 | - name: features
|
28 | 28 | include_tasks: features.yml
|
|
94 | 94 | group: "{{ icinga2_group }}"
|
95 | 95 | mode: 0644
|
96 | 96 | loop: "{{ result.files }}"
|
97 |
| - notify: reload icinga2 service |
| 97 | + notify: check-and-reload-icinga2-service |
98 | 98 |
|
99 | 99 | - name: enable features
|
100 | 100 | file:
|
101 | 101 | state: "{{ 'link' if (item.state is undefined or item.state != 'absent') else 'absent' }}"
|
102 | 102 | path: "{{ '/etc/icinga2/features-enabled/' + icinga2_feature_realname[item.name]|default(item.name) + '.conf' }}"
|
103 | 103 | src: "{{ '../features-available/' + icinga2_feature_realname[item.name]|default(item.name) + '.conf' if (item.state is undefined or item.state != 'absent') else omit }}"
|
104 | 104 | loop: "{{ icinga2_features }}"
|
105 |
| - notify: reload icinga2 service |
| 105 | + notify: check-and-reload-icinga2-service |
106 | 106 |
|
107 | 107 | - name: remove empty config files
|
108 | 108 | ansible.builtin.file:
|
109 | 109 | state: absent
|
110 | 110 | path: "{{ item |regex_replace('^'+icinga2_fragments_path, '/etc/icinga2') }}"
|
111 | 111 | when: item.split('/')[icinga2_fragments_path.split('/')|length] == 'conf.d' or item.split('/')[icinga2_fragments_path.split('/')|length] == 'zones.d'
|
112 | 112 | loop: "{{ _empty_result.stdout_lines }}"
|
113 |
| - notify: reload icinga2 service |
| 113 | + notify: check-and-reload-icinga2-service |
0 commit comments