aws_cloud: drop additional (-temp) known hosts entries
This commit is contained in:
parent
2f32aeec00
commit
c28c90504b
2 changed files with 16 additions and 1 deletions
|
@ -1,9 +1,12 @@
|
||||||
# Put here configuration for all copr instances (production, devel, ...)
|
# Put here configuration for all copr instances (production, devel, ...)
|
||||||
---
|
---
|
||||||
|
|
||||||
postfix_group: copr
|
postfix_group: copr
|
||||||
postfix_maincf: postfix/main.cf/main.cf.copr_smtp_auth_relay
|
postfix_maincf: postfix/main.cf/main.cf.copr_smtp_auth_relay
|
||||||
#TODO: tamplatize main.cf
|
#TODO: tamplatize main.cf
|
||||||
smtp_auth_relay_host: smtp-auth-cc-rdu01.fedoraproject.org
|
smtp_auth_relay_host: smtp-auth-cc-rdu01.fedoraproject.org
|
||||||
smtp_auth_relay_user: copr@fedoraproject.org
|
smtp_auth_relay_user: copr@fedoraproject.org
|
||||||
smtp_auth_relay_password: "{{ copr_smtp_password }}"
|
smtp_auth_relay_password: "{{ copr_smtp_password }}"
|
||||||
|
|
||||||
|
additional_known_hosts_cleanup:
|
||||||
|
copr-be-dev.aws.fedoraproject.org:
|
||||||
|
- copr-be-dev-temp.aws.fedoraproject.org
|
||||||
|
|
|
@ -18,6 +18,18 @@
|
||||||
- /root/.ssh/known_hosts
|
- /root/.ssh/known_hosts
|
||||||
when: birthday is defined
|
when: birthday is defined
|
||||||
|
|
||||||
|
- name: birthday=on - drop other known host entries
|
||||||
|
local_action: known_hosts path={{ item.0 }}
|
||||||
|
host={{ item.1 }}
|
||||||
|
state=absent
|
||||||
|
with_nested:
|
||||||
|
- [/root/.ssh/known_hosts]
|
||||||
|
- "{{ additional_known_hosts_cleanup[inventory_hostname] }}"
|
||||||
|
|
||||||
|
when:
|
||||||
|
- additional_known_hosts_cleanup is defined
|
||||||
|
- additional_known_hosts_cleanup[inventory_hostname] is defined
|
||||||
|
|
||||||
- name: gather the temporary ssh host key from the new instance
|
- name: gather the temporary ssh host key from the new instance
|
||||||
local_action: command ssh-keyscan -t {{ item }} {{ inventory_hostname }}
|
local_action: command ssh-keyscan -t {{ item }} {{ inventory_hostname }}
|
||||||
register: hostkey
|
register: hostkey
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue