1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Adjust booleans in misc modules. (#5160)

This commit is contained in:
Felix Fontein 2022-08-24 20:00:26 +02:00 committed by GitHub
parent 7533f9ac26
commit 403c4f7477
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 110 additions and 110 deletions

View file

@ -56,8 +56,8 @@ EXAMPLES = r'''
username: "{{influxdb_username}}"
password: "{{influxdb_password}}"
database_name: "{{influxdb_database_name}}"
ssl: yes
validate_certs: yes
ssl: true
validate_certs: true
'''
RETURN = r'''

View file

@ -77,8 +77,8 @@ EXAMPLES = r'''
policy_name: test
duration: 1h
replication: 1
ssl: yes
validate_certs: yes
ssl: true
validate_certs: true
state: present
- name: Create 1 day retention policy with 1 hour shard group duration
@ -108,8 +108,8 @@ EXAMPLES = r'''
policy_name: test
duration: INF
replication: 1
ssl: no
validate_certs: no
ssl: false
validate_certs: false
shard_group_duration: 1w
state: present
@ -120,8 +120,8 @@ EXAMPLES = r'''
policy_name: test
duration: 5d1h30m
replication: 1
ssl: no
validate_certs: no
ssl: false
validate_certs: false
shard_group_duration: 1d10h30m
state: present

View file

@ -35,7 +35,7 @@ options:
description:
- Whether the user should be in the admin role or not.
- Since version 2.8, the role will also be updated.
default: no
default: false
type: bool
state:
description:
@ -73,7 +73,7 @@ EXAMPLES = r'''
community.general.influxdb_user:
user_name: john
user_password: s3cr3t
admin: yes
admin: true
hostname: "{{ influxdb_hostname }}"
login_username: "{{ influxdb_username }}"
login_password: "{{ influxdb_password }}"

View file

@ -109,7 +109,7 @@ EXAMPLES = '''
community.general.elasticsearch_plugin:
name: ingest-geoip
state: present
force: yes
force: true
'''
import os

View file

@ -20,12 +20,12 @@ options:
dsn:
description:
- The connection string passed into ODBC.
required: yes
required: true
type: str
query:
description:
- The SQL query to perform.
required: yes
required: true
type: str
params:
description:
@ -38,7 +38,7 @@ options:
- Some databases allow a commit after a select whereas others raise an exception.
- Default is C(true) to support legacy module behavior.
type: bool
default: yes
default: true
version_added: 1.3.0
requirements:
- "python >= 2.6"
@ -58,7 +58,7 @@ EXAMPLES = '''
params:
- "value1"
commit: false
changed_when: no
changed_when: false
'''
RETURN = '''

View file

@ -57,10 +57,10 @@ options:
type: str
validate_certs:
description:
- If C(no), SSL certificates will not be validated. This should only be used
- If C(false), SSL certificates will not be validated. This should only be used
on personally controlled sites using self-signed certificates.
type: bool
default: 'yes'
default: true
'''
EXAMPLES = '''
@ -71,7 +71,7 @@ EXAMPLES = '''
- name: Wait for handoffs to finish. Use with async and poll.
community.general.riak:
wait_for_handoffs: yes
wait_for_handoffs: true
- name: Wait for riak_kv service to startup
community.general.riak:

View file

@ -57,7 +57,7 @@ options:
- Automatically commit the change only if the import succeed. Sometimes it is necessary to use autocommit=true, since some content can't be changed
within a transaction.
type: bool
default: 'no'
default: false
notes:
- Requires the pymssql Python package on the remote host. For Ubuntu, this
is as easy as pip install pymssql (See M(ansible.builtin.pip).)

View file

@ -64,7 +64,7 @@ options:
description:
- Remove any added source files and trees after adding to archive.
type: bool
default: no
default: false
notes:
- Requires tarfile, zipfile, gzip and bzip2 packages on target host.
- Requires lzma or backports.lzma if using xz format.
@ -84,7 +84,7 @@ EXAMPLES = r'''
- name: Compress regular file /path/to/foo into /path/to/foo.gz and remove it
community.general.archive:
path: /path/to/foo
remove: yes
remove: true
- name: Create a zip archive of /path/to/foo
community.general.archive:

View file

@ -65,44 +65,44 @@ options:
- Create a backup file including the timestamp information so you can get
the original file back if you somehow clobbered it incorrectly.
type: bool
default: no
default: false
state:
description:
- If set to C(absent) and I(exclusive) set to C(yes) all matching I(option) lines are removed.
- If set to C(absent) and I(exclusive) set to C(no) the specified C(option=value) lines are removed,
- If set to C(absent) and I(exclusive) set to C(true) all matching I(option) lines are removed.
- If set to C(absent) and I(exclusive) set to C(false) the specified C(option=value) lines are removed,
but the other I(option)s with the same name are not touched.
- If set to C(present) and I(exclusive) set to C(no) the specified C(option=values) lines are added,
- If set to C(present) and I(exclusive) set to C(false) the specified C(option=values) lines are added,
but the other I(option)s with the same name are not touched.
- If set to C(present) and I(exclusive) set to C(yes) all given C(option=values) lines will be
- If set to C(present) and I(exclusive) set to C(true) all given C(option=values) lines will be
added and the other I(option)s with the same name are removed.
type: str
choices: [ absent, present ]
default: present
exclusive:
description:
- If set to C(yes) (default), all matching I(option) lines are removed when I(state=absent),
- If set to C(true) (default), all matching I(option) lines are removed when I(state=absent),
or replaced when I(state=present).
- If set to C(no), only the specified I(value(s)) are added when I(state=present),
- If set to C(false), only the specified I(value(s)) are added when I(state=present),
or removed when I(state=absent), and existing ones are not modified.
type: bool
default: yes
default: true
version_added: 3.6.0
no_extra_spaces:
description:
- Do not insert spaces before and after '=' symbol.
type: bool
default: no
default: false
create:
description:
- If set to C(no), the module will fail if the file does not already exist.
- If set to C(false), the module will fail if the file does not already exist.
- By default it will create the file if it is missing.
type: bool
default: yes
default: true
allow_no_value:
description:
- Allow option without value and without '=' symbol.
type: bool
default: no
default: false
notes:
- While it is possible to add an I(option) without specifying a I(value), this makes no sense.
- As of Ansible 2.3, the I(dest) option has been changed to I(path) as default, but I(dest) still works as well.
@ -121,7 +121,7 @@ EXAMPLES = r'''
option: fav
value: lemonade
mode: '0600'
backup: yes
backup: true
- name: Ensure "temperature=cold is in section "[drinks]" in specified file
community.general.ini_file:
@ -129,7 +129,7 @@ EXAMPLES = r'''
section: drinks
option: temperature
value: cold
backup: yes
backup: true
- name: Add "beverage=lemon juice" is in section "[drinks]" in specified file
community.general.ini_file:
@ -139,7 +139,7 @@ EXAMPLES = r'''
value: lemon juice
mode: '0600'
state: present
exclusive: no
exclusive: false
- name: Ensure multiple values "beverage=coke" and "beverage=pepsi" are in section "[drinks]" in specified file
community.general.ini_file:

View file

@ -31,14 +31,14 @@ options:
underscores (_). File names are limited to 31 characters, directory nesting is limited to 8 levels, and path
names are limited to 255 characters.'
type: list
required: yes
required: true
elements: path
dest_iso:
description:
- The absolute path with file name of the new generated ISO file on local machine.
- Will create intermediate folders when they does not exist.
type: path
required: yes
required: true
interchange_level:
description:
- The ISO9660 interchange level to use, it dictates the rules on the names of files.

View file

@ -35,26 +35,26 @@ options:
description:
- The ISO image to extract files from.
type: path
required: yes
required: true
aliases: [ path, src ]
dest:
description:
- The destination directory to extract files to.
type: path
required: yes
required: true
files:
description:
- A list of files to extract from the image.
- Extracting directories does not work.
type: list
elements: str
required: yes
required: true
force:
description:
- If C(yes), which will replace the remote file when contents are different than the source.
- If C(no), the file will only be extracted and copied if the destination does not already exist.
- If C(true), which will replace the remote file when contents are different than the source.
- If C(false), the file will only be extracted and copied if the destination does not already exist.
type: bool
default: yes
default: true
executable:
description:
- The path to the C(7z) executable to use for extracting files from the ISO.
@ -62,7 +62,7 @@ options:
type: path
notes:
- Only the file checksum (content) is taken into account when extracting files
from the ISO image. If C(force=no), only checks the presence of the file.
from the ISO image. If C(force=false), only checks the presence of the file.
- In Ansible 2.3 this module was using C(mount) and C(umount) commands only,
requiring root access. This is no longer needed with the introduction of 7zip
for extraction.

View file

@ -21,7 +21,7 @@ options:
description:
- The CSV filename to read data from.
type: path
required: yes
required: true
aliases: [ filename ]
key:
description:
@ -45,7 +45,7 @@ options:
description:
- Whether the C(key) used is expected to be unique.
type: bool
default: yes
default: true
delimiter:
description:
- A one-character string used to separate fields.

View file

@ -81,18 +81,18 @@ options:
- Search for a given C(xpath) and provide the count of any matches.
- This parameter requires C(xpath) to be set.
type: bool
default: no
default: false
print_match:
description:
- Search for a given C(xpath) and print out any matches.
- This parameter requires C(xpath) to be set.
type: bool
default: no
default: false
pretty_print:
description:
- Pretty print XML output.
type: bool
default: no
default: false
content:
description:
- Search for a given C(xpath) and get content.
@ -110,13 +110,13 @@ options:
- Create a backup file including the timestamp information so you can get
the original file back if you somehow clobbered it incorrectly.
type: bool
default: no
default: false
strip_cdata_tags:
description:
- Remove CDATA tags surrounding text values.
- Note that this might break your XML file if text values contain characters that could be interpreted as XML.
type: bool
default: no
default: false
insertbefore:
description:
- Add additional child-element(s) before the first selected element for a given C(xpath).
@ -125,7 +125,7 @@ options:
or a hash where the key is an element name and the value is the element value.
- This parameter requires C(xpath) to be set.
type: bool
default: no
default: false
insertafter:
description:
- Add additional child-element(s) after the last selected element for a given C(xpath).
@ -134,7 +134,7 @@ options:
or a hash where the key is an element name and the value is the element value.
- This parameter requires C(xpath) to be set.
type: bool
default: no
default: false
requirements:
- lxml >= 2.3.0
notes:
@ -193,7 +193,7 @@ EXAMPLES = r'''
community.general.xml:
path: /foo/bar.xml
xpath: /business/beers/beer
count: yes
count: true
register: hits
- ansible.builtin.debug:
@ -219,7 +219,7 @@ EXAMPLES = r'''
community.general.xml:
path: /foo/bar.xml
xpath: '/business/beers/beer[text()="Rochefort 10"]'
insertbefore: yes
insertbefore: true
add_children:
- beer: Old Rasputin
- beer: Old Motor Oil
@ -330,7 +330,7 @@ actions:
backup_file:
description: The name of the backup file that was created
type: str
returned: when backup=yes
returned: when I(backup=true)
sample: /path/to/file.xml.1942.2017-08-24@14:16:01~
count:
description: The count of xpath matches.

View file

@ -17,9 +17,9 @@ description:
options:
append:
description:
- If C(yes), add the listed I(user) and I(group) to the group members.
- If C(no), only the listed I(user) and I(group) will be group members, removing any other members.
default: no
- If C(true), add the listed I(user) and I(group) to the group members.
- If C(false), only the listed I(user) and I(group) will be group members, removing any other members.
default: false
type: bool
version_added: 4.0.0
cn:
@ -45,9 +45,9 @@ options:
group:
description:
- List of group names assigned to this group.
- If I(append=no) and an empty list is passed all groups will be removed from this group.
- If I(append=false) and an empty list is passed all groups will be removed from this group.
- Groups that are already assigned but not passed will be removed.
- If I(append=yes) the listed groups will be assigned without removing other groups.
- If I(append=true) the listed groups will be assigned without removing other groups.
- If option is omitted assigned groups will not be checked or changed.
type: list
elements: str
@ -58,9 +58,9 @@ options:
user:
description:
- List of user names assigned to this group.
- If I(append=no) and an empty list is passed all users will be removed from this group.
- If I(append=false) and an empty list is passed all users will be removed from this group.
- Users that are already assigned but not passed will be removed.
- If I(append=yes) the listed users will be assigned without removing other users.
- If I(append=true) the listed users will be assigned without removing other users.
- If option is omitted assigned users will not be checked or changed.
type: list
elements: str
@ -110,7 +110,7 @@ EXAMPLES = r'''
name: developers
user:
- john
append: yes
append: true
state: present
ipa_host: ipa.example.com
ipa_user: admin

View file

@ -620,7 +620,7 @@ EXAMPLES = '''
client_template: test
use_template_config: False
use_template_scope: false
use_template_mappers: no
use_template_mappers: false
always_display_in_console: true
registered_nodes:
node01.example.com: 1507828202

View file

@ -38,7 +38,7 @@ options:
description:
- Verify TLS certificates (do not disable this in production).
type: bool
default: yes
default: true
realm:
type: str

View file

@ -36,15 +36,15 @@ options:
type: str
use_ssl:
description:
- If C(no), an HTTP connection will be used instead of the default HTTPS connection.
- If C(false), an HTTP connection will be used instead of the default HTTPS connection.
type: bool
default: 'yes'
default: true
validate_certs:
description:
- If C(no), SSL certificates will not be validated.
- This should only set to C(no) when used on personally controlled sites using self-signed certificates.
- If C(false), SSL certificates will not be validated.
- This should only set to C(false) when used on personally controlled sites using self-signed certificates.
type: bool
default: 'yes'
default: true
author:
- Dag Wieers (@dagwieers)
todo:
@ -60,7 +60,7 @@ EXAMPLES = r'''
host: cobbler01
username: cobbler
password: MySuperSecureP4sswOrd
run_once: yes
run_once: true
delegate_to: localhost
'''

View file

@ -36,15 +36,15 @@ options:
type: str
use_ssl:
description:
- If C(no), an HTTP connection will be used instead of the default HTTPS connection.
- If C(false), an HTTP connection will be used instead of the default HTTPS connection.
type: bool
default: 'yes'
default: true
validate_certs:
description:
- If C(no), SSL certificates will not be validated.
- This should only set to C(no) when used on personally controlled sites using self-signed certificates.
- If C(false), SSL certificates will not be validated.
- This should only set to C(false) when used on personally controlled sites using self-signed certificates.
type: bool
default: 'yes'
default: true
name:
description:
- The system name to manage.
@ -62,7 +62,7 @@ options:
- Sync on changes.
- Concurrently syncing Cobbler is bound to fail.
type: bool
default: no
default: false
state:
description:
- Whether the system should be present, absent or a query is made.
@ -101,7 +101,7 @@ EXAMPLES = r'''
password: ins3965!
name: bdsol-aci51-apic1.cisco.com
properties:
netboot_enabled: yes
netboot_enabled: true
state: present
delegate_to: localhost

View file

@ -63,7 +63,7 @@ options:
description:
- Whether to force a reboot (even when the system is already booted).
- As a safeguard, without force, hpilo_boot will refuse to reboot a server that is already running.
default: no
default: false
type: bool
ssl_version:
description:

View file

@ -36,7 +36,7 @@ options:
verbose:
description:
- Run hponcfg in verbose mode (-v).
default: no
default: false
type: bool
requirements:
- hponcfg tool

View file

@ -71,10 +71,10 @@ options:
type: int
validate_certs:
description:
- If C(no), SSL certificates will not be validated.
- This should only set to C(no) used on personally controlled sites using self-signed certificates.
- If C(false), SSL certificates will not be validated.
- This should only set to C(false) used on personally controlled sites using self-signed certificates.
type: bool
default: 'yes'
default: true
notes:
- The XML fragments don't need an authentication cookie, this is injected by the module automatically.
- The Cisco IMC XML output is being translated to JSON using the Cobra convention.
@ -93,7 +93,7 @@ EXAMPLES = r'''
hostname: '{{ imc_hostname }}'
username: '{{ imc_username }}'
password: '{{ imc_password }}'
validate_certs: no
validate_certs: false
content: |
<configConfMo><inConfig>
<computeRackUnit dn="sys/rack-unit-1" adminPower="down"/>
@ -105,7 +105,7 @@ EXAMPLES = r'''
hostname: '{{ imc_hostname }}'
username: '{{ imc_username }}'
password: '{{ imc_password }}'
validate_certs: no
validate_certs: false
timeout: 120
content: |
<!-- Configure Serial-on-LAN -->
@ -130,7 +130,7 @@ EXAMPLES = r'''
hostname: '{{ imc_hostname }}'
username: '{{ imc_username }}'
password: '{{ imc_password }}'
validate_certs: no
validate_certs: false
content: |
<!-- Configure PXE boot -->
<configConfMo><inConfig>
@ -148,7 +148,7 @@ EXAMPLES = r'''
hostname: '{{ imc_host }}'
username: '{{ imc_username }}'
password: '{{ imc_password }}'
validate_certs: no
validate_certs: false
content: |
<configConfMo><inConfig>
<lsbootStorage dn="sys/rack-unit-1/boot-policy/storage-read-write" access="read-write" order="1" type="storage"/>
@ -160,7 +160,7 @@ EXAMPLES = r'''
hostname: '{{ imc_host }}'
username: '{{ imc_username }}'
password: '{{ imc_password }}'
validate_certs: no
validate_certs: false
content: |
<configConfMo><inConfig>
<computeRackUnit dn="sys/rack-unit-1" usrLbl="Customer Lab - POD{{ pod_id }} - {{ inventory_hostname_short }}"/>
@ -172,7 +172,7 @@ EXAMPLES = r'''
hostname: '{{ imc_host }}'
username: '{{ imc_username }}'
password: '{{ imc_password }}'
validate_certs: no
validate_certs: false
timeout: 120
content: |
<configConfMo><inConfig>

View file

@ -77,14 +77,14 @@ options:
- If set, ask that system firmware uses this device beyond next boot.
Be aware many systems do not honor this.
type: bool
default: 'no'
default: false
uefiboot:
description:
- If set, request UEFI boot explicitly.
Strictly speaking, the spec suggests that if not set, the system should BIOS boot and offers no "don't care" option.
In practice, this flag not being set does not preclude UEFI boot on any system I've encountered.
type: bool
default: 'no'
default: false
requirements:
- "python >= 2.6"
- pyghmi

View file

@ -59,7 +59,7 @@ options:
aliases: [ keystone_v3_domain_id ]
tenant_mapping_enabled:
type: bool
default: 'no'
default: false
description: Whether to enable mapping of existing tenants. defaults to False.
api_version:
type: str
@ -88,7 +88,7 @@ options:
validate_certs:
description: Whether SSL certificates should be verified for HTTPS requests (deprecated). defaults to True.
type: bool
default: 'yes'
default: true
security_protocol:
type: str
description: How SSL certificates should be used for HTTPS requests. defaults to None.
@ -119,7 +119,7 @@ options:
validate_certs:
description: Whether SSL certificates should be verified for HTTPS requests (deprecated). defaults to True.
type: bool
default: 'yes'
default: true
security_protocol:
type: str
choices: ['ssl-with-validation','ssl-with-validation-custom-ca','ssl-without-validation','non-ssl']
@ -179,7 +179,7 @@ options:
description:
- Whether certificates should be verified for connections.
type: bool
default: yes
default: true
aliases: [ verify_ssl ]
'''

View file

@ -56,7 +56,7 @@ options:
description:
- Set value to C(true) to force node into install state if it already exists in stacki.
type: bool
default: no
default: false
state:
description:
- Set value to the desired state for the specified host.

View file

@ -85,7 +85,7 @@ options:
description:
- Specifies whether the certificate needs to be validated while communicating.
type: bool
default: no
default: false
extends_documentation_fragment:
- community.general.hpe3par
@ -108,7 +108,7 @@ EXAMPLES = r'''
set_size: 8
high_availability: MAG
disk_type: FC
secure: no
secure: false
- name: Delete CPG sample_cpg
community.general.ss_3par_cpg:
@ -117,7 +117,7 @@ EXAMPLES = r'''
storage_system_password: password
state: absent
cpg_name: sample_cpg
secure: no
secure: false
'''
RETURN = r'''

View file

@ -48,7 +48,7 @@ options:
description:
- Apply permissions to everyone.
type: bool
default: no
default: false
permissions:
description:
- The list of permission(s) to delegate (required if C(state) is C(present)).
@ -68,7 +68,7 @@ options:
description:
- Unallow permissions recursively (ignored when C(state) is C(present)).
type: bool
default: no
default: false
author:
- Nate Coraor (@natefoo)
'''
@ -84,7 +84,7 @@ EXAMPLES = r'''
community.general.zfs_delegate_admin:
name: rpool/myvol
groups: backup
everyone: yes
everyone: true
permissions: send
- name: Grant `zfs send,receive` to users `foo` and `bar` with local scope only
@ -92,12 +92,12 @@ EXAMPLES = r'''
name: rpool/myfs
users: foo,bar
permissions: send,receive
local: yes
local: true
- name: Revoke all permissions from everyone (permissions specifically assigned to users and groups remain)
community.general.zfs_delegate_admin:
name: rpool/myfs
everyone: yes
everyone: true
state: absent
'''

View file

@ -20,7 +20,7 @@ options:
name:
description:
- ZFS dataset name.
required: yes
required: true
aliases: [ "ds", "dataset" ]
type: str
recurse:
@ -28,13 +28,13 @@ options:
- Specifies if properties for any children should be recursively
displayed.
type: bool
default: 'no'
default: false
parsable:
description:
- Specifies if property values should be displayed in machine
friendly format.
type: bool
default: 'no'
default: false
properties:
description:
- Specifies which dataset properties should be queried in comma-separated format.
@ -62,7 +62,7 @@ EXAMPLES = '''
- name: Report space usage on ZFS filesystems under data/home
community.general.zfs_facts:
name: data/home
recurse: yes
recurse: true
type: filesystem
- ansible.builtin.debug: