Skip to content

Commit 9fbc7da

Browse files
committed
fixes fails if icinga2_objects arent defined which is the default
1 parent c4373c5 commit 9fbc7da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

roles/icinga2/tasks/objects.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- name: collect all config objects in play vars
99
set_fact:
1010
tmp_objects: "{{ tmp_objects| default([]) + lookup('list', icinga2_objects) }}"
11-
when: vars['icinga2_objects'][icinga2_config_host] is not defined
11+
when: icinga2_objects is defined and vars['icinga2_objects'][icinga2_config_host] is not defined
1212

1313
- icinga2_object:
1414
args: "{{ item }}"

0 commit comments

Comments
 (0)