From fa3df6c8389bae15532d11d8ffe8ded08fe5788a Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 6 Jan 2022 17:23:03 +0100 Subject: fix known host handling for openwrt-deploy --- common/cloud-install.yml | 2 ++ common/iso-install.yml | 2 ++ common/openwrt-deploy.yml | 3 +++ common/usb-install.yml | 2 ++ common/vm-deploy.yml | 3 +++ common/vm-install.yml | 2 ++ 6 files changed, 14 insertions(+) (limited to 'common') diff --git a/common/cloud-install.yml b/common/cloud-install.yml index 506ad2bc..f0a9870d 100644 --- a/common/cloud-install.yml +++ b/common/cloud-install.yml @@ -15,6 +15,8 @@ set_fact: ansible_ssh_extra_args: "-o StrictHostKeyChecking=no{% if install_jumphost is defined %} -o 'ProxyCommand ssh -q -a {{ install_jumphost }} -W %h:%p'{% endif %}" + - name: remove host-keys from ssh known-hosts + local_action: command "{{ (inventory_dir, '../remove-known-host.sh') | path_join | realpath }}" "{{ install_hostname }}" - name: clear all gathered facts meta: clear_facts - name: wait for host to start up diff --git a/common/iso-install.yml b/common/iso-install.yml index 796ae0d9..3088b107 100644 --- a/common/iso-install.yml +++ b/common/iso-install.yml @@ -47,6 +47,8 @@ set_fact: ansible_ssh_extra_args: "-o StrictHostKeyChecking=no{% if install_jumphost is defined %} -o 'ProxyCommand ssh -q -a {{ install_jumphost }} -W %h:%p'{% endif %}" + - name: remove host-keys from ssh known-hosts + local_action: command "{{ (inventory_dir, '../remove-known-host.sh') | path_join | realpath }}" "{{ install_hostname }}" - name: clear all gathered facts meta: clear_facts - name: wait for host to start up diff --git a/common/openwrt-deploy.yml b/common/openwrt-deploy.yml index eacb243c..1ef70a5e 100644 --- a/common/openwrt-deploy.yml +++ b/common/openwrt-deploy.yml @@ -15,3 +15,6 @@ gather_facts: no roles: - role: openwrt/deploy + post_tasks: + - name: remove host-keys from ssh known-hosts + local_action: command "{{ (inventory_dir, '../remove-known-host.sh') | path_join | realpath }}" "{{ install_hostname }}" diff --git a/common/usb-install.yml b/common/usb-install.yml index a7bbe012..a909e679 100644 --- a/common/usb-install.yml +++ b/common/usb-install.yml @@ -36,6 +36,8 @@ set_fact: ansible_ssh_extra_args: "-o StrictHostKeyChecking=no{% if install_jumphost is defined %} -o 'ProxyCommand ssh -q -a {{ install_jumphost }} -W %h:%p'{% endif %}" + - name: remove host-keys from ssh known-hosts + local_action: command "{{ (inventory_dir, '../remove-known-host.sh') | path_join | realpath }}" "{{ install_hostname }}" - name: clear all gathered facts meta: clear_facts - name: wait for host to start up diff --git a/common/vm-deploy.yml b/common/vm-deploy.yml index 5368df3e..8f4aa926 100644 --- a/common/vm-deploy.yml +++ b/common/vm-deploy.yml @@ -38,3 +38,6 @@ gather_facts: no roles: - role: vm/guest/deploy + post_tasks: + - name: remove host-keys from ssh known-hosts + local_action: command "{{ (inventory_dir, '../remove-known-host.sh') | path_join | realpath }}" "{{ install_hostname }}" diff --git a/common/vm-install.yml b/common/vm-install.yml index 90b08c56..cffde0c2 100644 --- a/common/vm-install.yml +++ b/common/vm-install.yml @@ -34,6 +34,8 @@ set_fact: ansible_ssh_extra_args: "-o StrictHostKeyChecking=no{% if install_jumphost is defined %} -o 'ProxyCommand ssh -q -a {{ install_jumphost }} -W %h:%p'{% endif %}" + - name: remove host-keys from ssh known-hosts + local_action: command "{{ (inventory_dir, '../remove-known-host.sh') | path_join | realpath }}" "{{ install_hostname }}" - name: clear all gathered facts meta: clear_facts - name: wait for host to start up -- cgit v1.2.3