review modules docs - batch(fragments) (#83431)

Co-authored-by: flowerysong <junk+github@flowerysong.com>
pull/83578/head
Alexei Znamensky 5 months ago committed by GitHub
parent 9472005dee
commit 4a1775acd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -14,8 +14,8 @@ options:
- Pipelining reduces the number of connection operations required to execute a module on the remote server, - Pipelining reduces the number of connection operations required to execute a module on the remote server,
by executing many Ansible modules without actual file transfers. by executing many Ansible modules without actual file transfers.
- This can result in a very significant performance improvement when enabled. - This can result in a very significant performance improvement when enabled.
- However this can conflict with privilege escalation (become). - However this can conflict with privilege escalation (C(become)).
For example, when using sudo operations you must first disable 'requiretty' in the sudoers file for the target hosts, For example, when using sudo operations you must first disable C(requiretty) in the sudoers file for the target hosts,
which is why this feature is disabled by default. which is why this feature is disabled by default.
env: env:
- name: ANSIBLE_PIPELINING - name: ANSIBLE_PIPELINING

@ -32,19 +32,19 @@ options:
suboptions: suboptions:
parent_group: parent_group:
type: str type: str
description: parent group for keyed group description: parent group for keyed group.
prefix: prefix:
type: str type: str
description: A keyed group name will start with this prefix description: A keyed group name will start with this prefix.
default: '' default: ''
separator: separator:
type: str type: str
description: separator used to build the keyed group name description: separator used to build the keyed group name.
default: "_" default: "_"
key: key:
type: str type: str
description: description:
- The key from input dictionary used to generate groups - The key from input dictionary used to generate groups.
default_value: default_value:
description: description:
- The default value when the host variable's value is an empty string. - The default value when the host variable's value is an empty string.
@ -53,16 +53,16 @@ options:
version_added: '2.12' version_added: '2.12'
trailing_separator: trailing_separator:
description: description:
- Set this option to V(False) to omit the O(keyed_groups[].separator) after the host variable when the value is an empty string. - Set this option to V(false) to omit the O(keyed_groups[].separator) after the host variable when the value is an empty string.
- This option is mutually exclusive with O(keyed_groups[].default_value). - This option is mutually exclusive with O(keyed_groups[].default_value).
type: bool type: bool
default: True default: true
version_added: '2.12' version_added: '2.12'
use_extra_vars: use_extra_vars:
version_added: '2.11' version_added: '2.11'
description: Merge extra vars into the available variables for composition (highest precedence). description: Merge extra vars into the available variables for composition (highest precedence).
type: bool type: bool
default: False default: false
ini: ini:
- section: inventory_plugins - section: inventory_plugins
key: use_extra_vars key: use_extra_vars
@ -70,10 +70,10 @@ options:
- name: ANSIBLE_INVENTORY_USE_EXTRA_VARS - name: ANSIBLE_INVENTORY_USE_EXTRA_VARS
leading_separator: leading_separator:
description: description:
- Use in conjunction with keyed_groups. - Use in conjunction with O(keyed_groups).
- By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore. - By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore.
- This is because the default prefix is "" and the default separator is "_". - This is because the default prefix is V("") and the default separator is V("_").
- Set this option to False to omit the leading underscore (or other separator) if no prefix is given. - Set this option to V(false) to omit the leading underscore (or other separator) if no prefix is given.
- If the group name is derived from a mapping the separator is still used to concatenate the items. - If the group name is derived from a mapping the separator is still used to concatenate the items.
- To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead. - To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead.
type: boolean type: boolean

@ -11,7 +11,7 @@ class ModuleDocFragment(object):
options: options:
display_skipped_hosts: display_skipped_hosts:
name: Show skipped hosts name: Show skipped hosts
description: "Toggle to control displaying skipped task/host results in a task" description: "Toggle to control displaying skipped task/host results in a task."
type: bool type: bool
default: yes default: yes
env: env:
@ -21,7 +21,7 @@ class ModuleDocFragment(object):
section: defaults section: defaults
display_ok_hosts: display_ok_hosts:
name: Show 'ok' hosts name: Show 'ok' hosts
description: "Toggle to control displaying 'ok' task/host results in a task" description: "Toggle to control displaying 'ok' task/host results in a task."
type: bool type: bool
default: yes default: yes
env: env:
@ -32,7 +32,7 @@ class ModuleDocFragment(object):
version_added: '2.7' version_added: '2.7'
display_failed_stderr: display_failed_stderr:
name: Use STDERR for failed and unreachable tasks name: Use STDERR for failed and unreachable tasks
description: "Toggle to control whether failed and unreachable tasks are displayed to STDERR (vs. STDOUT)" description: "Toggle to control whether failed and unreachable tasks are displayed to STDERR rather than STDOUT."
type: bool type: bool
default: no default: no
env: env:
@ -43,7 +43,7 @@ class ModuleDocFragment(object):
version_added: '2.7' version_added: '2.7'
show_custom_stats: show_custom_stats:
name: Show custom stats name: Show custom stats
description: 'This adds the custom stats set via the set_stats plugin to the play recap' description: 'This adds the custom stats set via the set_stats plugin to the play recap.'
type: bool type: bool
default: no default: no
env: env:
@ -53,7 +53,7 @@ class ModuleDocFragment(object):
section: defaults section: defaults
show_per_host_start: show_per_host_start:
name: Show per host task start name: Show per host task start
description: 'This adds output that shows when a task is started to execute for each host' description: 'This adds output that shows when a task starts to execute for each host.'
type: bool type: bool
default: no default: no
env: env:
@ -67,7 +67,7 @@ class ModuleDocFragment(object):
description: description:
- Toggle to control displaying markers when running in check mode. - Toggle to control displaying markers when running in check mode.
- "The markers are C(DRY RUN) at the beginning and ending of playbook execution (when calling C(ansible-playbook --check)) - "The markers are C(DRY RUN) at the beginning and ending of playbook execution (when calling C(ansible-playbook --check))
and C(CHECK MODE) as a suffix at every play and task that is run in check mode." and C(CHECK MODE) as a suffix at every play and task that is run in check mode."
type: bool type: bool
default: no default: no
version_added: '2.9' version_added: '2.9'
@ -79,8 +79,8 @@ class ModuleDocFragment(object):
show_task_path_on_failure: show_task_path_on_failure:
name: Show file path on failed tasks name: Show file path on failed tasks
description: description:
When a task fails, display the path to the file containing the failed task and the line number. - When a task fails, display the path to the file containing the failed task and the line number.
This information is displayed automatically for every task when running with C(-vv) or greater verbosity. This information is displayed automatically for every task when running with C(-vv) or greater verbosity.
type: bool type: bool
default: no default: no
env: env:

@ -16,7 +16,7 @@ options:
mode: mode:
description: description:
- The permissions the resulting filesystem object should have. - The permissions the resulting filesystem object should have.
- For those used to I(/usr/bin/chmod) remember that modes are actually octal numbers. - For those used to C(/usr/bin/chmod) remember that modes are actually octal numbers.
You must give Ansible enough information to parse them correctly. You must give Ansible enough information to parse them correctly.
For consistent results, quote octal numbers (for example, V('644') or V('1777')) so Ansible receives For consistent results, quote octal numbers (for example, V('644') or V('1777')) so Ansible receives
a string and can do its own conversion from string into number. a string and can do its own conversion from string into number.
@ -33,7 +33,7 @@ options:
type: raw type: raw
owner: owner:
description: description:
- Name of the user that should own the filesystem object, as would be fed to I(chown). - Name of the user that should own the filesystem object, as would be fed to C(chown).
- When left unspecified, it uses the current user unless you are root, in which - When left unspecified, it uses the current user unless you are root, in which
case it can preserve the previous ownership. case it can preserve the previous ownership.
- Specifying a numeric username will be assumed to be a user ID and not a username. Avoid numeric usernames to avoid this confusion. - Specifying a numeric username will be assumed to be a user ID and not a username. Avoid numeric usernames to avoid this confusion.
@ -41,7 +41,7 @@ options:
type: str type: str
group: group:
description: description:
- Name of the group that should own the filesystem object, as would be fed to I(chown). - Name of the group that should own the filesystem object, as would be fed to C(chown).
- When left unspecified, it uses the current group of the current user unless you are root, - When left unspecified, it uses the current group of the current user unless you are root,
in which case it can preserve the previous ownership. in which case it can preserve the previous ownership.
type: str type: str
@ -82,8 +82,8 @@ options:
attributes: attributes:
description: description:
- The attributes the resulting filesystem object should have. - The attributes the resulting filesystem object should have.
- To get supported flags look at the man page for I(chattr) on the target system. - To get supported flags look at the man page for C(chattr) on the target system.
- This string should contain the attributes in the same order as the one displayed by I(lsattr). - This string should contain the attributes in the same order as the one displayed by C(lsattr).
- The C(=) operator is assumed as default, otherwise C(+) or C(-) operators need to be included in the string. - The C(=) operator is assumed as default, otherwise C(+) or C(-) operators need to be included in the string.
type: str type: str
aliases: [ attr ] aliases: [ attr ]

@ -35,7 +35,7 @@ options:
key: cache_plugin key: cache_plugin
cache_timeout: cache_timeout:
description: description:
- Cache duration in seconds - Cache duration in seconds.
default: 3600 default: 3600
type: int type: int
env: env:
@ -60,7 +60,7 @@ options:
key: cache_connection key: cache_connection
cache_prefix: cache_prefix:
description: description:
- Prefix to use for cache plugin files/tables - Prefix to use for cache plugin files/tables.
default: ansible_inventory_ default: ansible_inventory_
env: env:
- name: ANSIBLE_CACHE_PLUGIN_PREFIX - name: ANSIBLE_CACHE_PLUGIN_PREFIX

@ -29,15 +29,15 @@ class ModuleDocFragment(object):
pretty_results: pretty_results:
name: Configure output for readability name: Configure output for readability
description: description:
- Configure the result format to be more readable - Configure the result format to be more readable.
- When O(result_format) is set to V(yaml) this option defaults to V(True), and defaults - When O(result_format) is set to V(yaml) this option defaults to V(true), and defaults
to V(False) when configured to V(json). to V(false) when configured to V(json).
- Setting this option to V(True) will force V(json) and V(yaml) results to always be pretty - Setting this option to V(true) will force V(json) and V(yaml) results to always be pretty
printed regardless of verbosity. printed regardless of verbosity.
- When set to V(True) and used with the V(yaml) result format, this option will - When set to V(true) and used with the V(yaml) result format, this option will
modify module responses in an attempt to produce a more human friendly output at the expense modify module responses in an attempt to produce a more human friendly output at the expense
of correctness, and should not be relied upon to aid in writing variable manipulations of correctness, and should not be relied upon to aid in writing variable manipulations
or conditionals. For correctness, set this option to V(False) or set O(result_format) to V(json). or conditionals. For correctness, set this option to V(false) or set O(result_format) to V(json).
type: bool type: bool
default: null default: null
env: env:

@ -29,7 +29,7 @@ skipped:
type: bool type: bool
sample: false sample: false
results: results:
description: List of module results, description: List of module results.
returned: when using a loop. returned: when using a loop.
type: list type: list
sample: [{changed: True, msg: 'first item changed'}, {changed: False, msg: 'second item ok'}] sample: [{changed: True, msg: 'first item changed'}, {changed: False, msg: 'second item ok'}]

@ -34,7 +34,7 @@ options:
system_tmpdirs: system_tmpdirs:
description: description:
- "List of valid system temporary directories on the managed machine for Ansible to validate - "List of valid system temporary directories on the managed machine for Ansible to validate
O(remote_tmp) against, when specific permissions are needed. These must be world O(remote_tmp) against, when specific permissions are needed. These must be world
readable, writable, and executable. This list should only contain directories which the readable, writable, and executable. This list should only contain directories which the
system administrator has pre-created with the proper ownership and permissions otherwise system administrator has pre-created with the proper ownership and permissions otherwise
security issues can arise." security issues can arise."
@ -51,7 +51,7 @@ options:
- name: ansible_system_tmpdirs - name: ansible_system_tmpdirs
async_dir: async_dir:
description: description:
- Directory in which ansible will keep async job information - Directory in which ansible will keep async job information.
default: '~/.ansible_async' default: '~/.ansible_async'
env: [{name: ANSIBLE_ASYNC_DIR}] env: [{name: ANSIBLE_ASYNC_DIR}]
ini: ini:

@ -38,7 +38,7 @@ options:
url_username: url_username:
description: description:
- The username for use in HTTP basic authentication. - The username for use in HTTP basic authentication.
- This parameter can be used without O(url_password) for sites that allow empty passwords - This parameter can be used without O(url_password) for sites that allow empty passwords.
type: str type: str
url_password: url_password:
description: description:
@ -66,7 +66,7 @@ options:
authentication. authentication.
- Requires the Python library L(gssapi,https://github.com/pythongssapi/python-gssapi) to be installed. - Requires the Python library L(gssapi,https://github.com/pythongssapi/python-gssapi) to be installed.
- Credentials for GSSAPI can be specified with O(url_username)/O(url_password) or with the GSSAPI env var - Credentials for GSSAPI can be specified with O(url_username)/O(url_password) or with the GSSAPI env var
C(KRB5CCNAME) that specified a custom Kerberos credential cache. E(KRB5CCNAME) that specified a custom Kerberos credential cache.
- NTLM authentication is B(not) supported even if the GSSAPI mech for NTLM has been installed. - NTLM authentication is B(not) supported even if the GSSAPI mech for NTLM has been installed.
type: bool type: bool
default: no default: no

@ -47,7 +47,7 @@ options:
description: description:
- Specify how many times the module will redirect a connection to an - Specify how many times the module will redirect a connection to an
alternative URI before the connection fails. alternative URI before the connection fails.
- If set to V(0) or O(follow_redirects) is set to V(none), or V(safe) when - If set to V(0) or O(follow_redirects) is set to V(null), or V(safe) when
not doing a C(GET) or C(HEAD) it prevents all redirection. not doing a C(GET) or C(HEAD) it prevents all redirection.
default: 50 default: 50
type: int type: int
@ -67,8 +67,8 @@ options:
type: bool type: bool
client_cert: client_cert:
description: description:
- The path to the client certificate (.pfx) that is used for X509 - The path to the client certificate C(.pfx) that is used for X509
authentication. This path can either be the path to the C(pfx) on the authentication. This path can either be the path to the C(.pfx) on the
filesystem or the PowerShell certificate path filesystem or the PowerShell certificate path
C(Cert:\CurrentUser\My\<thumbprint>). C(Cert:\CurrentUser\My\<thumbprint>).
- The WinRM connection must be authenticated with C(CredSSP) or C(become) - The WinRM connection must be authenticated with C(CredSSP) or C(become)
@ -119,8 +119,7 @@ options:
proxy_url: proxy_url:
description: description:
- An explicit proxy to use for the request. - An explicit proxy to use for the request.
- By default, the request will use the IE defined proxy unless O(use_proxy) - By default, the request will use the IE defined proxy unless O(use_proxy=no).
is set to V(no).
type: str type: str
proxy_username: proxy_username:
description: description:

@ -12,7 +12,7 @@ options:
validate: validate:
description: description:
- The validation command to run before copying the updated file into the final destination. - The validation command to run before copying the updated file into the final destination.
- A temporary file path is used to validate, passed in through '%s' which must be present as in the examples below. - A temporary file path is used to validate, passed in through C(%s) which must be present as in the examples below.
- Also, the command is passed securely so shell features such as expansion and pipes will not work. - Also, the command is passed securely so shell features such as expansion and pipes will not work.
- For an example on how to handle more complex validation than what this - For an example on how to handle more complex validation than what this
option provides, see R(handling complex validation,complex_configuration_validation). option provides, see R(handling complex validation,complex_configuration_validation).

Loading…
Cancel
Save