Use command module instead of shell if possible
This commit is contained in:
parent
505110f580
commit
528f2fc775
@ -30,9 +30,9 @@
|
|||||||
|
|
||||||
- name: Create cloud-init disk
|
- name: Create cloud-init disk
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
ansible.builtin.shell: >
|
ansible.builtin.command: >
|
||||||
cloud-localds {{ vm_path | default('/var/lib/libvirt/images/') }}\
|
cloud-localds {{ vm_path | default('/var/lib/libvirt/images/') }}/{{ hostname }}-cloudinit.iso
|
||||||
{{ hostname }}-cloudinit.iso /tmp/cloud-user-data-{{ hostname }}.yml \
|
/tmp/cloud-user-data-{{ hostname }}.yml
|
||||||
-N /tmp/cloud-network-config-{{ hostname }}.yml
|
-N /tmp/cloud-network-config-{{ hostname }}.yml
|
||||||
changed_when: result.rc == 0
|
changed_when: result.rc == 0
|
||||||
register: result
|
register: result
|
||||||
|
Loading…
Reference in New Issue
Block a user