Revert "Fix ssh_known_hosts hostname entries"

This reverts commit 84dd53a386.

This appears to have broken ovb.

2019-11-12 17:28:30 | The error appears to be in '/usr/share/ansible/roles/tripleo-ssh-known-hosts/tasks/main.yml': line 46, column 7

Change-Id: I5ae0efba8338cfcc3e43588ebea89238aabc7c82
This commit is contained in:
Alex Schultz 2019-11-12 19:26:52 +00:00
parent 84dd53a386
commit 035bdc34a6
2 changed files with 2 additions and 12 deletions

View File

@ -1,10 +0,0 @@
---
fixes:
- |
Previously the tripleo-ssh-known-hosts ansible role used the list of
network names to create the different possible hostnames in the
ssh_known_hosts file. The network names do not match the actual network
hostnames, like internal_api vs. internalapi which results in ssh host
verification to fail and e.g. live migration to fail.
This changes to use the _hostname inventory information to be used to add
hostname information to the ssh_known_hosts file.

View File

@ -52,8 +52,8 @@
{%- if enabled_networks | length > 0 and role_networks and role_networks | length > 0 %},
{%- for network in enabled_networks %}
{%- if network in role_networks %}
[{{ hostvars[host][networks[network]['name'] ~ '_ip'] }}]*,[{{ host }}.{{ networks[network]['name'] | replace("_", "") }}]*,{% if 1 %}{% endif %}
[{{ hostvars[host][networks[network]['name'] ~ '_hostname'] }}]*{% if not loop.last %},{% endif %}
[{{ hostvars[host][networks[network]['name'] ~ '_ip'] }}]*,[{{ host }}.{{ networks[network]['name'] }}]*,{% if 1 %}{% endif %}
[{{ host }}.{{ networks[network]['name'] }}.{{ cloud_domain }}]*{% if not loop.last %},{% endif %}
{%- endif -%}
{%- endfor -%}
{%- endif -%}