File tree Expand file tree Collapse file tree 6 files changed +27
-0
lines changed Expand file tree Collapse file tree 6 files changed +27
-0
lines changed Original file line number Diff line number Diff line change 3
3
set_fact :
4
4
icinga2_dict_features : " {{ icinga2_dict_features|default({}) | combine({ item.name: item }) }}"
5
5
with_items : " {{ icinga2_features }}"
6
+ loop_control :
7
+ label : " {{ item.name }}"
6
8
7
9
- name : main config file {{ icinga2_config_path + '/icinga2.conf' }}
8
10
template :
60
62
state : absent
61
63
dest : " {{ item.path }}"
62
64
loop : " {{ result_frag.files }}"
65
+ loop_control :
66
+ label : " {{ item.path }}"
63
67
when :
64
68
- item.path not in icinga2_local_objects
65
69
- item.path not in _icinga2_custom_conf_paths
94
98
group : " {{ icinga2_group }}"
95
99
mode : 0644
96
100
loop : " {{ result.files }}"
101
+ loop_control :
102
+ label : " {{ item.path }}"
97
103
notify : check-and-reload-icinga2-service
98
104
99
105
- name : enable features
102
108
path : " {{ '/etc/icinga2/features-enabled/' + icinga2_feature_realname[item.name]|default(item.name) + '.conf' }}"
103
109
src : " {{ '../features-available/' + icinga2_feature_realname[item.name]|default(item.name) + '.conf' if (item.state is undefined or item.state != 'absent') else omit }}"
104
110
loop : " {{ icinga2_features }}"
111
+ loop_control :
112
+ label : " {{ item.name }}"
105
113
notify : check-and-reload-icinga2-service
106
114
107
115
- name : remove empty config files
Original file line number Diff line number Diff line change 12
12
set_fact :
13
13
features_enabled : " {{ features_enabled|default([]) + [ icinga2_feature_realname[item.path| basename| splitext| first]| default(item.path| basename| splitext| first) ] }}"
14
14
loop : " {{ icinga2_collected_features.files }}"
15
+ loop_control :
16
+ label : " {{ item.path }}"
15
17
when : icinga2_purge_features
16
18
17
19
- name : purge features
25
27
- name : configure features
26
28
include_tasks : " features/{{ item.name }}.yml"
27
29
loop : " {{ icinga2_features }}"
30
+ loop_control :
31
+ label : " {{ item.name }}"
Original file line number Diff line number Diff line change 52
52
loop : " {{ result.results }}"
53
53
loop_control :
54
54
loop_var : idx
55
+ label : " Add '{{ idx.path }}' to local objects"
55
56
56
57
- name : feature api Zone objects
57
58
icinga2_object :
67
68
loop : " {{ result.results }}"
68
69
loop_control :
69
70
loop_var : idx
71
+ label : " Add '{{ idx.path }}' to local objects"
70
72
71
73
- name : create new CA
72
74
block :
Original file line number Diff line number Diff line change 26
26
- icinga2_object :
27
27
args : " {{ item }}"
28
28
with_items : " {{ tmp_objects }}"
29
+ loop_control :
30
+ label : " {{ item.type }} '{{ item.name }}'"
29
31
when : tmp_objects is defined
30
32
register : result
31
33
32
34
- set_fact :
33
35
icinga2_local_objects : " {{ icinga2_local_objects|default([]) + [item.dest] }}"
34
36
with_items : " {{ result.results }}"
37
+ loop_control :
38
+ label : " {{ item.dest }}"
35
39
when : result.results is defined
36
40
37
41
- name : prepare custom config
Original file line number Diff line number Diff line change 15
15
- name : Check each icingaweb2_modules key against known modules
16
16
when : not icingaweb2_ignore_unknown_modules
17
17
loop : " {{ icingaweb2_modules | default({}) | dict2items }}"
18
+ loop_control :
19
+ label : " {{ item.key }}"
18
20
ansible.builtin.assert :
19
21
that :
20
22
- item.key in icingaweb2_module_packages.keys()
24
26
ansible.builtin.set_fact :
25
27
icingaweb2_packages : " {{ icingaweb2_packages + [ icingaweb2_module_packages[item.key] ] }}"
26
28
loop : " {{ icingaweb2_modules | dict2items }}"
29
+ loop_control :
30
+ label : " {{ item.key }}"
27
31
when : icingaweb2_modules is defined and icingaweb2_module_packages[item.key] is defined and item.value.enabled | bool == true and item.value.source == "package"
28
32
no_log : true
29
33
66
70
- icingaweb2_modules is defined
67
71
- item.key in icingaweb2_module_packages.keys()
68
72
loop : " {{ icingaweb2_modules | dict2items }}"
73
+ loop_control :
74
+ label : " {{ item.key }}"
69
75
70
76
# Many daemons fail before e.g. the resource is set up or the schema hasn't been migrated. This is a workaround.
71
77
- name : Manage enabled module daemons
74
80
state : restarted
75
81
when : icingaweb2_modules is defined and item.value.enabled|default(false)|bool == true and item.key in ['vspheredb', 'x509']
76
82
loop : " {{ icingaweb2_modules | dict2items }}"
83
+ loop_control :
84
+ label : " {{ item.key }}"
Original file line number Diff line number Diff line change 24
24
loop : " {{ icingaweb2_users }}"
25
25
loop_control :
26
26
loop_var : _current_user
27
+ label : " {{ _current_user.username }}"
27
28
when : icingaweb2_users | length > 0
You can’t perform that action at this time.
0 commit comments