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 commitc71d234bf8
) (cherry picked from commitc51cce0c4a
)
This commit is contained in:
parent
d02470c9fa
commit
eae3867fc7
|
@ -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