diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/cloud-install.yml | 2 | ||||
-rw-r--r-- | common/iso-install.yml | 2 | ||||
-rw-r--r-- | common/openwrt-deploy.yml | 20 | ||||
-rw-r--r-- | common/usb-install.yml | 2 | ||||
-rw-r--r-- | common/vm-deploy.yml | 3 | ||||
-rw-r--r-- | common/vm-install.yml | 2 |
6 files changed, 31 insertions, 0 deletions
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 new file mode 100644 index 00000000..1ef70a5e --- /dev/null +++ b/common/openwrt-deploy.yml @@ -0,0 +1,20 @@ +--- +- name: preparations and sanity checks + hosts: "{{ install_hostname }}" + connection: local + gather_facts: no + tasks: + - name: check if there is only one output image + fail: + msg: "the output_images variable must only contain a single image" + when: + - (output_images | length) != 1 + +- name: deploy openwrt image + hosts: "{{ install_hostname }}" + 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 |