Merge "Fix known_hosts module issue on centos/rocky 10"
This commit is contained in:
@@ -61,8 +61,10 @@
|
||||
user: "{{ ansible_facts.user_id }}"
|
||||
key: "{{ lookup('file', bootstrap_ssh_private_key_path ~ '.pub') }}"
|
||||
|
||||
# NOTE(priteau): Exclude comments from ssh-keyscan output because they break
|
||||
# known_hosts on centos/rocky 10.
|
||||
- name: Scan for SSH keys
|
||||
command: ssh-keyscan {{ item }}
|
||||
shell: ssh-keyscan {{ item }} | grep -v '^#'
|
||||
with_items:
|
||||
- localhost
|
||||
- 127.0.0.1
|
||||
|
@@ -13,9 +13,11 @@
|
||||
vm provision' and 'kayobe overcloud inventory discover'.
|
||||
when: not ansible_host | default(inventory_hostname)
|
||||
|
||||
# NOTE(priteau): Exclude comments from ssh-keyscan output because they break
|
||||
# known_hosts on centos/rocky 10.
|
||||
- name: Scan for SSH keys
|
||||
local_action:
|
||||
module: command ssh-keyscan {{ item }}
|
||||
module: shell ssh-keyscan {{ item }} | grep -v '^#'
|
||||
with_items:
|
||||
- "{{ ansible_host | default(inventory_hostname) }}"
|
||||
register: keyscan_result
|
||||
|
Reference in New Issue
Block a user