From 3b7578a6658ec2d4aa96344bacf4b116cbb1853c Mon Sep 17 00:00:00 2001 From: spmfox Date: Sat, 17 Jun 2023 00:44:59 -0400 Subject: ansible-lint cleanup --- roles/libvirt/tasks/vm-install.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'roles/libvirt/tasks/vm-install.yml') diff --git a/roles/libvirt/tasks/vm-install.yml b/roles/libvirt/tasks/vm-install.yml index 9acb530..560ebfc 100644 --- a/roles/libvirt/tasks/vm-install.yml +++ b/roles/libvirt/tasks/vm-install.yml @@ -3,18 +3,18 @@ src: "kickstart/{{ libvirt_vm_kickstart_file }}" dest: "/{{ libvirt_vm_destination }}/{{ libvirt_vm_kickstart_file }}" mode: '0644' - when: libvirt_vm_kickstart_file|length > 0 + when: libvirt_vm_kickstart_file | length > 0 - name: Create VM from kickstart in destination filesystem ansible.builtin.command: 'virt-install --name {{ libvirt_vm_name }} --memory {{ libvirt_vm_memory }} --vcpus {{ libvirt_vm_vcpus }} --network {{ libvirt_vm_network }} --disk size={{ libvirt_vm_disk_size }},path=/{{ libvirt_vm_destination }}/{{ libvirt_vm_name }}.img,format={{ libvirt_vm_disk_format }} --location {{ libvirt_vm_location_path }}{{ libvirt_vm_location_arguments }} --os-variant {{ libvirt_vm_os }} --initrd-inject=/{{ libvirt_vm_destination }}/{{ libvirt_vm_kickstart_file }} --extra-args="inst.ks=file:/{{ libvirt_vm_kickstart_file }}"' - when: libvirt_vm_kickstart_file|length > 0 + when: libvirt_vm_kickstart_file | length > 0 - name: Create VM without kickstart in destination filesystem ansible.builtin.command: 'virt-install --name {{ libvirt_vm_name }} --memory {{ libvirt_vm_memory }} --vcpus {{ libvirt_vm_vcpus }} --network {{ libvirt_vm_network }} --disk size={{ libvirt_vm_disk_size }},path=/{{ libvirt_vm_destination }}/{{ libvirt_vm_name }}.img,format={{ libvirt_vm_disk_format }} --location {{ libvirt_vm_location_path }}{{ libvirt_vm_location_arguments }} --os-variant {{ libvirt_vm_os }}' - when: libvirt_vm_kickstart_file|length == 0 + when: libvirt_vm_kickstart_file | length == 0 - name: Remove kickstart file from destination filesystem (if defined) ansible.builtin.file: path: "/{{ libvirt_vm_destination }}/{{ libvirt_vm_kickstart_file }}" state: absent - when: libvirt_vm_kickstart_file|length > 0 + when: libvirt_vm_kickstart_file | length > 0 -- cgit