|
|
|
|
@ -1,13 +1,14 @@
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
- name: Connect - Ensure we don't have an incorrect SSH host key stored on the Ansible controller
|
|
|
|
|
- name: Managing SSH Host Keys
|
|
|
|
|
when: create_vm_proxmox_clone_vm is changed
|
|
|
|
|
block:
|
|
|
|
|
- name: Connect - Remove any existing host keys for this host
|
|
|
|
|
ansible.builtin.command:
|
|
|
|
|
cmd: "ssh-keygen -R {{ ansible_host }}"
|
|
|
|
|
register: create_vm_proxmox_remove_ssh_host_key_cmd
|
|
|
|
|
changed_when:
|
|
|
|
|
- '"# Host " + ansible_host + " found" in create_vm_proxmox_remove_ssh_host_key_cmd.stdout'
|
|
|
|
|
when:
|
|
|
|
|
- create_vm_proxmox_remove_ssh_host_key | bool
|
|
|
|
|
changed_when: '"# Host " + ansible_host + " found" in create_vm_proxmox_remove_ssh_host_key_cmd.stdout'
|
|
|
|
|
when: create_vm_proxmox_remove_ssh_host_key | bool
|
|
|
|
|
delegate_to: localhost
|
|
|
|
|
|
|
|
|
|
- name: Connect - Wait for SSH to become available
|
|
|
|
|
|