Adjust booleans in misc modules. (#5160) (#5174)

(cherry picked from commit 403c4f7477)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot] 2022-08-24 20:29:08 +02:00 committed by GitHub
parent 43dc6ba533
commit c5ff49db56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 110 additions and 110 deletions

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: