We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83fb42c commit cb8c450Copy full SHA for cb8c450
roles/icinga2/tasks/configure.yml
@@ -101,6 +101,6 @@
101
ansible.builtin.file:
102
state: absent
103
path: "{{ item |regex_replace('^'+icinga2_fragments_path, '/etc/icinga2') }}"
104
- when: item.split('/')[3] == 'conf.d' or item.split('/')[3] == 'zones.d'
+ when: item.split('/')[icinga2_fragments_path.split('/')|length] == 'conf.d' or item.split('/')[icinga2_fragments_path.split('/')|length] == 'zones.d'
105
loop: "{{ _empty_result.stdout_lines }}"
106
notify: reload icinga2 service
0 commit comments