Skip to content

Commit

Permalink
[edpm_ssh_known_hosts]Ensure host IP is added
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gibizer committed Oct 13, 2023
1 parent 046e93b commit 77fe6c8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions roles/edpm_ssh_known_hosts/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [] %}
Expand Down

0 comments on commit 77fe6c8

Please sign in to comment.