Skip to content

Commit 9bc9aaf

Browse files
author
Christian Iuga
committed
Pass yamlint on the role
Correct these warning/errors: - truthy value should be one of [false, true] (truthy) - missing starting space in comment (comments) - comment not indented like content (comments-indentation) - trailing spaces (trailing-spaces)
1 parent 022ec84 commit 9bc9aaf

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

defaults/main.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ libvirt_vm_default_console_log_dir: "/var/log/libvirt-consoles"
66

77
# Whether UUID should be calculated by hashing the VM name. If not, the UUID is
88
# randomly generated by libvirt when the VM is defined.
9-
libvirt_vm_default_uuid_deterministic: False
9+
libvirt_vm_default_uuid_deterministic: false
1010

1111
# The default location for libvirt images
1212
libvirt_volume_default_images_path: '/var/lib/libvirt/images'
@@ -42,7 +42,7 @@ libvirt_vm_emulator:
4242
# Default value for clock syncing. The default (false) uses <clock sync="localtime">
4343
# to configure the instances clock synchronisation. Change to a timezone to make
4444
# configuration use <clock offset="specified offset">
45-
libvirt_vm_clock_offset: False
45+
libvirt_vm_clock_offset: false
4646

4747
# Default value for whether to trust guest receive filters. This gets mapped to
4848
# the trustGuestRxFilters attribute of VM interfaces.
@@ -53,7 +53,7 @@ libvirt_vm_trust_guest_rx_filters: false
5353
# the values of the deprecated variables below.
5454
# See README.md or tasks/main.yml for these attributes' defaults.
5555
libvirt_vms:
56-
# State of the VM. May be 'present' or 'absent'.
56+
# State of the VM. May be 'present' or 'absent'.
5757
- state: "{{ libvirt_vm_state }}"
5858

5959
# Name of the VM.
@@ -85,7 +85,7 @@ libvirt_vms:
8585

8686
# XML template file to source domain definition
8787
xml_file: vm.xml.j2
88-
88+
8989
# May be one of: bios, or efi.
9090
boot_firmware: bios
9191

@@ -113,6 +113,6 @@ libvirt_vm_volumes:
113113
libvirt_vm_interfaces:
114114
libvirt_vm_console_log_path:
115115
# Required, so we should fail if not set.
116-
#libvirt_vm_name:
117-
#libvirt_vm_memory_mb:
118-
#libvirt_vm_vcpus:
116+
# libvirt_vm_name:
117+
# libvirt_vm_memory_mb:
118+
# libvirt_vm_vcpus:

meta/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
galaxy_info:
3-
#role_name: libvirt_vm
3+
# role_name: libvirt_vm
44
author: Mark Goddard
55
description: >
66
Role to configure and create VMs on a Libvirt/KVM hypervisor

tasks/check-usb-devices.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
command: lsusb -d {{ usb_device.vendor }}:{{ usb_device.product }}
44
register: host_attached_usb_device
55
become: true
6-
changed_when: false
6+
changed_when: false
77
failed_when: false
88

99
- name: Check USB device is present on Host system

tasks/destroy-vm.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
command: list_vms
88
uri: "{{ libvirt_vm_uri | default(omit, true) }}"
99
register: result
10-
become: yes
10+
become: true
1111

1212
- block:
1313
- name: Ensure the VM is absent
1414
virt:
1515
name: "{{ vm.name }}"
1616
state: destroyed
1717
uri: "{{ libvirt_vm_uri | default(omit, true) }}"
18-
become: yes
18+
become: true
1919

2020
# note(wszumski): the virt module does not seem to support
2121
# removing vms with nvram defined - as a workaround, use the
@@ -30,6 +30,6 @@
3030
undefine
3131
{% if boot_firmware == 'efi' %} --nvram{% endif %}
3232
{{ vm.name }}
33-
become: yes
33+
become: true
3434
changed_when: true
3535
when: vm.name in result.list_vms

tasks/destroy-volumes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
changed_when:
1212
- volume_result is success
1313
- (volume_result.stdout | from_json).changed | default(True)
14-
become: yes
14+
become: true

tasks/volumes.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
changed_when:
3737
- volume_result is success
3838
- (volume_result.stdout | from_json).changed | default(True)
39-
check_mode: False
39+
check_mode: false
4040
become: true
4141

4242
- name: Ensure the VM network volumes exist
@@ -49,5 +49,5 @@
4949
changed_when:
5050
- volume_result_network is success
5151
- volume_result_network.rc == 1
52-
check_mode: False
52+
check_mode: false
5353
become: true

0 commit comments

Comments
 (0)