for initial installs use gathered ssh host key, then remove and use signed ones
This commit is contained in:
parent
585dba2a76
commit
6b1fc4d83f
2 changed files with 20 additions and 0 deletions
|
@ -172,3 +172,9 @@
|
||||||
- config
|
- config
|
||||||
- sshd
|
- sshd
|
||||||
- base
|
- base
|
||||||
|
|
||||||
|
- name: make sure there is no old ssh host key for the host still around
|
||||||
|
local_action: known_hosts path={{item}} host={{ inventory_hostname }} state=absent
|
||||||
|
ignore_errors: True
|
||||||
|
with_items:
|
||||||
|
- /root/.ssh/known_hosts
|
||||||
|
|
|
@ -76,6 +76,13 @@
|
||||||
tags:
|
tags:
|
||||||
- armv7-kernel
|
- armv7-kernel
|
||||||
|
|
||||||
|
- name: make sure there is no old ssh host key for the host still around
|
||||||
|
local_action: known_hosts path={{item}} host={{ inventory_hostname }} state=absent
|
||||||
|
ignore_errors: True
|
||||||
|
with_items:
|
||||||
|
- /root/.ssh/known_hosts
|
||||||
|
when: inventory_hostname not in result.list_vms
|
||||||
|
|
||||||
- name: (osbs-control01.stg) make sure there is no old ssh host key for the host still around
|
- name: (osbs-control01.stg) make sure there is no old ssh host key for the host still around
|
||||||
known_hosts: path={{item}} host={{ inventory_hostname }} state=absent
|
known_hosts: path={{item}} host={{ inventory_hostname }} state=absent
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
|
@ -104,6 +111,13 @@
|
||||||
register: hostkey
|
register: hostkey
|
||||||
when: inventory_hostname not in result.list_vms
|
when: inventory_hostname not in result.list_vms
|
||||||
|
|
||||||
|
- name: add new ssh host key (until we can sign it)
|
||||||
|
local_action: known_hosts path={{item}} key="{{ hostkey.stdout }}" host={{ inventory_hostname }} state=present
|
||||||
|
ignore_errors: True
|
||||||
|
with_items:
|
||||||
|
- /root/.ssh/known_hosts
|
||||||
|
when: inventory_hostname not in result.list_vms
|
||||||
|
|
||||||
- name: (osbs-control01.stg) add new ssh host key
|
- name: (osbs-control01.stg) add new ssh host key
|
||||||
known_hosts: path={{item}} key="{{ hostkey.stdout }}" host={{ inventory_hostname }} state=present
|
known_hosts: path={{item}} key="{{ hostkey.stdout }}" host={{ inventory_hostname }} state=present
|
||||||
ignore_errors: True
|
ignore_errors: True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue