diff --git a/roles/cleanup/defaults/main.yml b/roles/cleanup/defaults/main.yml index cdeb7b0..f364ac2 100644 --- a/roles/cleanup/defaults/main.yml +++ b/roles/cleanup/defaults/main.yml @@ -3,13 +3,3 @@ cleanup_verify_boot: true cleanup_boot_timeout: 300 cleanup_remove_on_failure: true - -# Libvirt paths -cleanup_libvirt_image_dir: >- - {{ - system_cfg.path - if system_cfg is defined and (system_cfg.path | string | length) > 0 - else '/var/lib/libvirt/images' - }} -cleanup_libvirt_cloudinit_path: >- - {{ [cleanup_libvirt_image_dir, hostname ~ '-cloudinit.iso'] | ansible.builtin.path_join }} diff --git a/roles/cleanup/tasks/libvirt.yml b/roles/cleanup/tasks/libvirt.yml index 01e3b8b..8989aee 100644 --- a/roles/cleanup/tasks/libvirt.yml +++ b/roles/cleanup/tasks/libvirt.yml @@ -85,7 +85,7 @@ - name: Remove cloud-init disk ansible.builtin.file: - path: "{{ cleanup_libvirt_cloudinit_path }}" + path: "{{ virtualization_libvirt_cloudinit_path }}" state: absent - name: Ensure VM is powered off before restart