Look for lower-case hostname when adding to ssh_known_hosts
We need to normalize hostnames to lower-case in order to avoid
case discrepancies.
Change-Id: Iaf73f9ae346425881e70500cf3ee28599fc4171a
Partial-Bug: 1809273
(cherry picked from commit c71d234bf8
)
This commit is contained in:
parent
f8ecef4457
commit
c51cce0c4a
|
@ -3,7 +3,7 @@
|
|||
become: true
|
||||
lineinfile:
|
||||
path: /etc/ssh/ssh_known_hosts
|
||||
line: "{{ ssh_known_hosts[hostvars[item]['ansible_hostname']] + ' ssh-rsa ' + hostvars[item]['ansible_ssh_host_key_rsa_public'] }}"
|
||||
line: "{{ ssh_known_hosts[hostvars[item]['ansible_hostname'] | lower] + ' ssh-rsa ' + hostvars[item]['ansible_ssh_host_key_rsa_public'] }}"
|
||||
create: yes
|
||||
with_items: "{{ groups['overcloud']|intersect(play_hosts) }}"
|
||||
tags:
|
||||
|
|
Loading…
Reference in New Issue