diff --git a/extraconfig/services/openshift-master.yaml b/extraconfig/services/openshift-master.yaml index 4f726c5fbd..2832b11aa1 100644 --- a/extraconfig/services/openshift-master.yaml +++ b/extraconfig/services/openshift-master.yaml @@ -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) }} diff --git a/extraconfig/services/openshift-worker.yaml b/extraconfig/services/openshift-worker.yaml index 9482c984fb..761e4c7eff 100644 --- a/extraconfig/services/openshift-worker.yaml +++ b/extraconfig/services/openshift-worker.yaml @@ -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) }}