refactor: remove unnecessary changed_when from set_fact tasks
This commit is contained in:
@@ -14,7 +14,6 @@
|
||||
- name: Initialize cleaned VM XML
|
||||
ansible.builtin.set_fact:
|
||||
cleanup_libvirt_domain_xml: "{{ cleanup_libvirt_get_xml.get_xml }}"
|
||||
changed_when: false
|
||||
|
||||
- name: Remove boot ISO device from VM XML (source match)
|
||||
when: boot_iso is defined and boot_iso | length > 0
|
||||
@@ -28,7 +27,6 @@
|
||||
when: boot_iso is defined and boot_iso | length > 0
|
||||
ansible.builtin.set_fact:
|
||||
cleanup_libvirt_domain_xml: "{{ cleanup_libvirt_xml_strip_boot_source.xmlstring }}"
|
||||
changed_when: false
|
||||
|
||||
- name: Remove boot ISO device from VM XML (target fallback)
|
||||
community.general.xml:
|
||||
@@ -40,7 +38,6 @@
|
||||
- name: Update cleaned VM XML after removing boot ISO
|
||||
ansible.builtin.set_fact:
|
||||
cleanup_libvirt_domain_xml: "{{ cleanup_libvirt_xml_strip_boot.xmlstring }}"
|
||||
changed_when: false
|
||||
|
||||
- name: Remove cloud-init ISO device from VM XML (source match)
|
||||
community.general.xml:
|
||||
@@ -52,7 +49,6 @@
|
||||
- name: Update cleaned VM XML after removing cloud-init ISO source match
|
||||
ansible.builtin.set_fact:
|
||||
cleanup_libvirt_domain_xml: "{{ cleanup_libvirt_xml_strip_cloudinit_source.xmlstring }}"
|
||||
changed_when: false
|
||||
|
||||
- name: Remove cloud-init ISO device from VM XML (target fallback)
|
||||
community.general.xml:
|
||||
@@ -64,7 +60,6 @@
|
||||
- name: Update cleaned VM XML after removing cloud-init ISO
|
||||
ansible.builtin.set_fact:
|
||||
cleanup_libvirt_domain_xml: "{{ cleanup_libvirt_xml_strip_cloudinit.xmlstring }}"
|
||||
changed_when: false
|
||||
|
||||
- name: Strip XML declaration for libvirt define
|
||||
ansible.builtin.set_fact:
|
||||
@@ -76,7 +71,6 @@
|
||||
| regex_replace("(?i)encoding=[\"'][^\"']+[\"']", "")
|
||||
| trim
|
||||
}}
|
||||
changed_when: false
|
||||
|
||||
- name: Update VM definition without installer media
|
||||
community.libvirt.virt:
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
loop_control:
|
||||
label: "{{ item | to_json }}"
|
||||
extended: true
|
||||
changed_when: false
|
||||
|
||||
- name: Render Xen VM configuration without installer media
|
||||
vars:
|
||||
|
||||
Reference in New Issue
Block a user