Specify changed_when for shell commands

This commit is contained in:
2024-10-28 19:20:05 +01:00
parent 5312ec8cc6
commit e37b5a535b
9 changed files with 71 additions and 1 deletions

View File

@@ -64,6 +64,8 @@
when: cdrom_devices.stdout_lines | length > 0
ansible.builtin.command: virsh --connect qemu:///system detach-disk {{ hostname }} {{ item }} --persistent
with_items: "{{ cdrom_devices.stdout_lines }}"
changed_when: result.rc == 0
register: result
- name: Start the VM
community.libvirt.virt: