Skip to content

Commit 4e38c66

Browse files
committed
Prevent failure on empty inventory groups
If role-defined groups exist in the inventory but are empty, execution fails. This patch ensures that the default value is used not only if the group is missing, but also if it exists and is empty. Fixes #31.
1 parent a75bf7a commit 4e38c66

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@
8080
- name: Configure /vsmagent/allowed_clients
8181
tlconfig:
8282
param: /vsmagent/allowed_clients
83-
value: "{{ groups['thinlinc_masters'] | default(['localhost']) | join(' ') }}"
83+
value: "{{ groups['thinlinc_masters'] | default(['localhost'], true) | join(' ') }}"
8484
notify: restart vsmagent
8585
when: "'thinlinc_agents' in group_names"
8686

8787
- name: Configure list of agent servers
8888
tlconfig:
8989
param: /vsmserver/subclusters/Default/agents
90-
value: "{{ groups['thinlinc_agents'] | default(['localhost']) | join(' ') }}"
90+
value: "{{ groups['thinlinc_agents'] | default(['localhost'], true) | join(' ') }}"
9191
notify: restart vsmserver
9292
when: "'thinlinc_masters' in group_names"

0 commit comments

Comments
 (0)