Skip to content

Commit

Permalink
Remove default empty dict in case of undefined attribute
Browse files Browse the repository at this point in the history
Previous line always evaluated to false/empty dict which
caused to always try and use groups.tester even if groups.undercloud
was defined.

Change-Id: I43bd9719d866894a0a829704683a5cf0fac8dfb3
  • Loading branch information
abregman committed May 26, 2020
1 parent 724740f commit 95089ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
tasks:
- name: Add chosen node to tester group
add_host:
name: "{{ install.get('tester', {}).get('node')|default(groups.get('undercloud', {})|first, true)|default(groups.tester|first, true) }}"
name: "{{ install.get('tester', {}).get('node', {})|default(groups.undercloud|first, true)|default(groups.tester|first) }}"
groups: "tester"
- include_role:
name: inventory-update
Expand Down

0 comments on commit 95089ae

Please sign in to comment.