Browse Source

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
changes/49/703649/3
Oliver Walsh 3 years ago committed by Kevin Carter (cloudnull)
parent
commit
b3fad83fd5
  1. 4
      tripleo_ansible/roles/tripleo_ssh_known_hosts/tasks/main.yml

4
tripleo_ansible/roles/tripleo_ssh_known_hosts/tasks/main.yml

@ -50,8 +50,8 @@
{% for host in (groups['overcloud'] | intersect(play_hosts)) %}
{% set hostdata = hostvars[host] %}
{% 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) %}
{% set line = '[' ~ ctlplane_ip ~ ']*,[' ~ host ~ '.' ~ cloud_domain ~ ']*,[' ~ host ~ ']*' %}
{% if (cloud_domain is defined) and (hostdata['ctlplane_ip'] is defined) %}
{% set line = '[' ~ hostdata['ctlplane_ip'] ~ ']*,[' ~ host ~ '.' ~ cloud_domain ~ ']*,[' ~ host ~ ']*' %}
{% set role_networks = hostdata['role_networks'] | default([]) %}
{% 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)) %}

Loading…
Cancel
Save