From 77fe6c81854909be1050249f2698c30001f47c43 Mon Sep 17 00:00:00 2001 From: Balazs Gibizer Date: Fri, 13 Oct 2023 16:33:38 +0200 Subject: [PATCH] [edpm_ssh_known_hosts]Ensure host IP is added Unfortunately nova still uses the IP of the compute nodes to scp data during cold migration instead of the hypervisor_hostname which is the FQDN of the compute node. So we need to make sure the ctlplane_ip of the node is also in the known_hosts file. --- roles/edpm_ssh_known_hosts/tasks/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/edpm_ssh_known_hosts/tasks/main.yml b/roles/edpm_ssh_known_hosts/tasks/main.yml index e6124ab76..6b18f2485 100644 --- a/roles/edpm_ssh_known_hosts/tasks/main.yml +++ b/roles/edpm_ssh_known_hosts/tasks/main.yml @@ -72,6 +72,9 @@ {% if 'canonical_hostname' in hostdata %} {% set _ = entries.append(hostdata['canonical_hostname']) %} {% endif %} + {% if 'ctlplane_ip' in hostdata %} + {% set _ = entries.append(hostdata['ctlplane_ip']) %} + {% endif %} {% set _ = entries.append(host ~ '*') %} {% if 'ansible_port' in hostdata and hostdata['ansible_port']|int != 22 %} {% set hosts = [] %}