Fix the ctlplane_ip in ssh_known_hosts entries
This should be ctlplane_ip for the host in question, not the current host. Change-Id: I19587c760d7fcc0313e97c1708da901f8e75c394 Closes-bug: #1860451
This commit is contained in:
parent
67ce344e30
commit
b3fad83fd5
|
@ -50,8 +50,8 @@
|
||||||
{% for host in (groups['overcloud'] | intersect(play_hosts)) %}
|
{% for host in (groups['overcloud'] | intersect(play_hosts)) %}
|
||||||
{% set hostdata = hostvars[host] %}
|
{% set hostdata = hostvars[host] %}
|
||||||
{% if ('ansible_ssh_host_key_rsa_public' in hostdata) or (ansible_ssh_host_key_rsa_public is defined) %}
|
{% if ('ansible_ssh_host_key_rsa_public' in hostdata) or (ansible_ssh_host_key_rsa_public is defined) %}
|
||||||
{% if (cloud_domain is defined) and (ctlplane_ip is defined) %}
|
{% if (cloud_domain is defined) and (hostdata['ctlplane_ip'] is defined) %}
|
||||||
{% set line = '[' ~ ctlplane_ip ~ ']*,[' ~ host ~ '.' ~ cloud_domain ~ ']*,[' ~ host ~ ']*' %}
|
{% set line = '[' ~ hostdata['ctlplane_ip'] ~ ']*,[' ~ host ~ '.' ~ cloud_domain ~ ']*,[' ~ host ~ ']*' %}
|
||||||
{% set role_networks = hostdata['role_networks'] | default([]) %}
|
{% set role_networks = hostdata['role_networks'] | default([]) %}
|
||||||
{% if ((enabled_networks is defined and enabled_networks) and ((enabled_networks | length) > 0)) %}
|
{% if ((enabled_networks is defined and enabled_networks) and ((enabled_networks | length) > 0)) %}
|
||||||
{% if ((role_networks is defined and role_networks) and ((role_networks | length) > 0)) %}
|
{% if ((role_networks is defined and role_networks) and ((role_networks | length) > 0)) %}
|
||||||
|
|
Loading…
Reference in New Issue