feat/update-cloud-init-template #5
@@ -36,7 +36,7 @@
|
||||
- name: Set candidate information
|
||||
ansible.builtin.set_fact:
|
||||
has_image_file: "{{ image_exists.stat.exists }}"
|
||||
root_free_space: "{{ (ansible_mounts | selectattr('mount', 'equalto', '/') | first).size_available }}"
|
||||
root_free_space: "{{ (ansible_facts['mounts'] | selectattr('mount', 'equalto', '/') | first).size_available }}"
|
||||
|
||||
- name: Select target host
|
||||
ansible.builtin.set_fact:
|
||||
@@ -66,7 +66,9 @@
|
||||
|
||||
- name: Destroy existing template if present
|
||||
ansible.builtin.command: qm destroy {{ template_vmid }} --purge
|
||||
when: template_status.rc == 0
|
||||
when:
|
||||
- template_status.rc == 0
|
||||
- image_download.changed
|
||||
|
||||
- name: Rebuild the template
|
||||
when:
|
||||
|
||||
Reference in New Issue
Block a user