Fix some minor bugs

master
Ronald 8 months ago
parent ecae9ebb8c
commit ce935412fa

@ -7,6 +7,7 @@
ansible.builtin.command: ansible.builtin.command:
cmd: "ssh-keygen -R {{ ansible_host }}" cmd: "ssh-keygen -R {{ ansible_host }}"
register: create_vm_proxmox_remove_ssh_host_key_cmd register: create_vm_proxmox_remove_ssh_host_key_cmd
throttle: 1
changed_when: '"# Host " + ansible_host + " found" in create_vm_proxmox_remove_ssh_host_key_cmd.stdout' 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 when: create_vm_proxmox_remove_ssh_host_key | bool
delegate_to: localhost delegate_to: localhost

@ -19,7 +19,7 @@
name: "{{ create_vm_proxmox_name }}" name: "{{ create_vm_proxmox_name }}"
state: absent state: absent
force: true force: true
timeout: 30 timeout: 120
when: when:
- create_vm_proxmox_check_if_vm_exists.proxmox_vms is defined - create_vm_proxmox_check_if_vm_exists.proxmox_vms is defined
- create_vm_proxmox_check_if_vm_exists.proxmox_vms | length > 0 - create_vm_proxmox_check_if_vm_exists.proxmox_vms | length > 0
@ -57,7 +57,7 @@
vmid: "{{ create_vm_proxmox_vmid }}" vmid: "{{ create_vm_proxmox_vmid }}"
node: "{{ create_vm_proxmox_host }}" node: "{{ create_vm_proxmox_host }}"
vcpus: "{{ create_vm_proxmox_numb_cpus | default(omit) }}" vcpus: "{{ create_vm_proxmox_numb_cpus | default(omit) }}"
cores: "{{ create_vm_proxmox_numb_cores | default(omit) }}" cores: "{{ create_vm_proxmox_numb_cores | default(2) }}"
memory: "{{ create_vm_proxmox_memory_mb | default(omit) }}" memory: "{{ create_vm_proxmox_memory_mb | default(omit) }}"
update: true update: true
delegate_to: localhost delegate_to: localhost
@ -93,7 +93,9 @@
update_unsafe: true update_unsafe: true
ide: ide:
ide2: "{{ create_vm_proxmox_cloudinit_storage_pool }}:cloudinit,format=raw" ide2: "{{ create_vm_proxmox_cloudinit_storage_pool }}:cloudinit,format=raw"
when: create_vm_proxmox_add_cloudinit_drive | bool when:
- create_vm_proxmox_clone_vm is changed
- create_vm_proxmox_add_cloudinit_drive | bool
delegate_to: localhost delegate_to: localhost
- name: Proxmox - Add cloud-init settings - name: Proxmox - Add cloud-init settings

Loading…
Cancel
Save