File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 61
61
user : " {{ ansible_facts.user_id }}"
62
62
key : " {{ lookup('file', bootstrap_ssh_private_key_path ~ '.pub') }}"
63
63
64
+ # NOTE(priteau): Exclude comments from ssh-keyscan output because they break
65
+ # known_hosts on centos/rocky 10.
64
66
- name : Scan for SSH keys
65
- command : ssh-keyscan {{ item }}
67
+ shell : ssh-keyscan {{ item }} | grep -v '^#'
66
68
with_items :
67
69
- localhost
68
70
- 127.0.0.1
Original file line number Diff line number Diff line change 13
13
vm provision' and 'kayobe overcloud inventory discover'.
14
14
when : not ansible_host | default(inventory_hostname)
15
15
16
+ # NOTE(priteau): Exclude comments from ssh-keyscan output because they break
17
+ # known_hosts on centos/rocky 10.
16
18
- name : Scan for SSH keys
17
19
local_action :
18
- module : command ssh-keyscan {{ item }}
20
+ module : shell ssh-keyscan {{ item }} | grep -v '^#'
19
21
with_items :
20
22
- " {{ ansible_host|default(inventory_hostname) }}"
21
23
register : keyscan_result
You can’t perform that action at this time.
0 commit comments