aboutsummaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/guest-configure/tasks/main.yml8
-rw-r--r--roles/guest-configure/tasks/user.yml4
-rw-r--r--roles/libvirt/tasks/vm-install.yml8
3 files changed, 10 insertions, 10 deletions
diff --git a/roles/guest-configure/tasks/main.yml b/roles/guest-configure/tasks/main.yml
index 4be58be..519fcf0 100644
--- a/roles/guest-configure/tasks/main.yml
+++ b/roles/guest-configure/tasks/main.yml
@@ -9,16 +9,16 @@
- name: Import packages task
ansible.builtin.import_tasks: packages.yml
- when: (guest_configure_packages|length > 0) or (guest_configure_packages_preq|length > 0)
+ when: (guest_configure_packages | length > 0) or (guest_configure_packages_preq | length > 0)
- name: Import user creation task
ansible.builtin.import_tasks: user.yml
- when: guest_configure_user|length > 0
+ when: guest_configure_user | length > 0
- name: Import services task
ansible.builtin.import_tasks: services.yml
- when: guest_configure_services|length > 0
+ when: guest_configure_services | length > 0
- name: Import automatic-update task
ansible.builtin.import_tasks: automatic-update.yml
- when: guest_configure_services|length > 0
+ when: guest_configure_services | length > 0
diff --git a/roles/guest-configure/tasks/user.yml b/roles/guest-configure/tasks/user.yml
index 8f3e27d..2458ccf 100644
--- a/roles/guest-configure/tasks/user.yml
+++ b/roles/guest-configure/tasks/user.yml
@@ -6,14 +6,14 @@
ansible.builtin.user:
name: "{{ guest_configure_user }}"
shell: "{{ guest_configure_user_shell }}"
- when: guest_configure_user_shell|length > 0
+ when: guest_configure_user_shell | length > 0
- name: Add user SSH key (if defined)
ansible.posix.authorized_key:
user: "{{ guest_configure_user }}"
state: present
key: "{{ guest_configure_ssh_key }}"
- when: guest_configure_ssh_key|length > 0
+ when: guest_configure_ssh_key | length > 0
- name: RedHat block
when: ansible_os_family == "RedHat"
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