Skip to content

Commit

Permalink
doc: set booleans to true/false for consistency
Browse files Browse the repository at this point in the history
The Ansible Steering Committee voted to make all docs refer to booleans
as true/false, as there is currently a mix of
yes/no/True/False/true/false.

See ansible-community/community-topics#116

Fixes #139
  • Loading branch information
csmart committed Sep 7, 2022
1 parent 494339a commit 925f239
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions plugins/modules/virt.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
- Enforce an action.
- Currently only implemented with command C(undefine).
This option can be used instead of providing all C(flags).
If C(yes), C(undefine) removes also any related nvram or other metadata, if existing.
If C(no) or not set, C(undefine) executes only if there is no nvram or other metadata existing.
If C(true), C(undefine) removes also any related nvram or other metadata, if existing.
If C(false) or not set, C(undefine) executes only if there is no nvram or other metadata existing.
Otherwise the task fails and the guest is kept defined without change.
C(yes) and option C(flags) should not be provided together. In this case
C(undefine) ignores C(yes), considers only C(flags) and issues a warning.
C(true) and option C(flags) should not be provided together. In this case
C(undefine) ignores C(true), considers only C(flags) and issues a warning.
type: bool
extends_documentation_fragment:
- community.libvirt.virt.options_uri
Expand Down Expand Up @@ -81,14 +81,14 @@
- name: Set autostart for a VM
community.libvirt.virt:
name: foo
autostart: yes
autostart: true
# Defining a VM and making is autostart with host. VM will be off after this task
- name: Define vm from xml and set autostart
community.libvirt.virt:
command: define
xml: "{{ lookup('template', 'vm_template.xml.j2') }}"
autostart: yes
autostart: true
# Undefine VM only, if it has no existing nvram or other metadata
- name: Undefine qemu VM
Expand All @@ -99,7 +99,7 @@
- name: "Undefine qemu VM with force"
community.libvirt.virt:
name: foo
force: yes
force: true
# Undefine VM and remove all of its specified metadata specified
# Result would the same as with force=true
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/virt_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@
- name: Ensure that a given network will be started at boot
community.libvirt.virt_net:
autostart: yes
autostart: true
name: br_nat
- name: Disable autostart for a given network
community.libvirt.virt_net:
autostart: no
autostart: false
name: br_nat
- name: Add a new host in the dhcp pool
Expand Down
4 changes: 2 additions & 2 deletions plugins/modules/virt_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@
- name: Ensure that a given pool will be started at boot
community.libvirt.virt_pool:
autostart: yes
autostart: true
name: vms
- name: Disable autostart for a given pool
community.libvirt.virt_pool:
autostart: no
autostart: false
name: vms
'''

Expand Down

0 comments on commit 925f239

Please sign in to comment.