mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Adjust booleans in misc modules. (#5160)
This commit is contained in:
parent
7533f9ac26
commit
403c4f7477
27 changed files with 110 additions and 110 deletions
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue