From 528f2fc7755e1747ccf115aa647bc92609353c76 Mon Sep 17 00:00:00 2001 From: Sandwich Date: Mon, 28 Oct 2024 21:15:10 +0100 Subject: [PATCH] Use command module instead of shell if possible --- roles/virtualization/tasks/libvirt.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/virtualization/tasks/libvirt.yml b/roles/virtualization/tasks/libvirt.yml index 5734940..b1bcd90 100644 --- a/roles/virtualization/tasks/libvirt.yml +++ b/roles/virtualization/tasks/libvirt.yml @@ -30,9 +30,9 @@ - name: Create cloud-init disk delegate_to: localhost - ansible.builtin.shell: > - cloud-localds {{ vm_path | default('/var/lib/libvirt/images/') }}\ - {{ hostname }}-cloudinit.iso /tmp/cloud-user-data-{{ hostname }}.yml \ + ansible.builtin.command: > + cloud-localds {{ vm_path | default('/var/lib/libvirt/images/') }}/{{ hostname }}-cloudinit.iso + /tmp/cloud-user-data-{{ hostname }}.yml -N /tmp/cloud-network-config-{{ hostname }}.yml changed_when: result.rc == 0 register: result