Merge "Do not fail on non existent ansible group"
This commit is contained in:
commit
2075455dde
@ -97,7 +97,7 @@ outputs:
|
||||
template: |
|
||||
masters:
|
||||
hosts:
|
||||
{% for host in groups['ROLENAME'] -%}
|
||||
{% for host in groups['ROLENAME'] | default([]) -%}
|
||||
{{ hostvars.raw_get(host)['ansible_hostname'] }}:
|
||||
ansible_user: {{ hostvars.raw_get(host)['ansible_user'] | default(hostvars.raw_get(host)['ansible_ssh_user']) | default('root') }}
|
||||
ansible_host: {{ hostvars.raw_get(host)['ansible_host'] | default(host) }}
|
||||
|
@ -77,7 +77,7 @@ outputs:
|
||||
template: |
|
||||
nodes:
|
||||
hosts:
|
||||
{% for host in groups['ROLENAME'] -%}
|
||||
{% for host in groups['ROLENAME'] | default([]) -%}
|
||||
{{ hostvars.raw_get(host)['ansible_hostname'] }}:
|
||||
ansible_user: {{ hostvars.raw_get(host)['ansible_user'] | default(hostvars.raw_get(host)['ansible_ssh_user']) | default('root') }}
|
||||
ansible_host: {{ hostvars.raw_get(host)['ansible_host'] | default(host) }}
|
||||
|
Loading…
Reference in New Issue
Block a user