attribs last PR for now ... i hope (#75778)

* attribs last PR for now ... i hope

* thatsallfolks!

* fixes

* Update lib/ansible/modules/template.py

Co-authored-by: Matt Martz <matt@sivel.net>

* Update lib/ansible/modules/validate_argument_spec.py

Co-authored-by: Matt Martz <matt@sivel.net>

* moar fixes

* asldf

* missing import

* iswearihadaddedthese

Co-authored-by: Matt Martz <matt@sivel.net>
pull/75793/head
Brian Coca 3 years ago committed by GitHub
parent a22964609e
commit 872fda8815
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -57,11 +57,11 @@ attributes:
support: none
check_mode:
support: none
diff_mode:
support: none
delegation:
support: none
details: Aside from C(register) and/or in combination with C(delegate_facts), it has little effect.
diff_mode:
support: none
platform:
platforms: all
seealso:

@ -73,7 +73,7 @@ attributes:
diff_mode:
support: full
platform:
platforms: posix
platforms: posix, windows
safe_file_operations:
support: none
vault:
@ -91,8 +91,6 @@ notes:
C(fail_when) or C(ignore_errors) to get this ability. They may
also explicitly set C(fail_on_missing) to C(no) to get the
non-failing behaviour.
- This module is also supported for Windows targets.
- Supports C(check_mode).
seealso:
- module: ansible.builtin.copy
- module: ansible.builtin.slurp

@ -133,11 +133,23 @@ options:
- All arguments accepted by the M(ansible.builtin.file) module also work here.
type: str
extends_documentation_fragment:
- action_common_attributes
- action_common_attributes.files
- files
- validate
attributes:
check_mode:
support: full
diff_mode:
support: full
platform:
platforms: posix
safe_file_operations:
support: full
vault:
support: none
notes:
- As of Ansible 2.3, the I(dest) option has been changed to I(path) as default, but I(dest) still works as well.
- Supports C(check_mode).
seealso:
- module: ansible.builtin.blockinfile
- module: ansible.builtin.copy

@ -44,6 +44,25 @@ options:
default: auto
requirements:
- Whatever is required for the package plugins specific for each system.
extends_documentation_fragment:
- action_common_attributes
- action_common_attributes.flow
attributes:
action:
support: full
async:
support: full
bypass_host_loop:
support: none
check_mode:
details: support depends on the underlying plugin invoked
support: N/A
diff_mode:
details: support depends on the underlying plugin invoked
support: N/A
platform:
details: The support depends on the availability for the specific plugin for each platform and if fact gathering is able to detect it
platforms: all
notes:
- While `package` abstracts package managers to ease dealing with multiple distributions, package name often differs for the same software.

@ -41,8 +41,18 @@ author:
- Matthew Jones (@matburt)
- Brian Coca (@bcoca)
- Adam Miller (@maxamillion)
notes:
- Supports C(check_mode).
extends_documentation_fragment:
- action_common_attributes
- action_common_attributes.facts
attributes:
check_mode:
support: full
diff_mode:
support: none
facts:
support: full
platform:
platforms: posix
'''
EXAMPLES = '''

@ -38,9 +38,31 @@ options:
default: 'yes'
version_added: 2.5
author: "Tim Bielawa (@tbielawa)"
extends_documentation_fragment:
- action_common_attributes
- action_common_attributes.conn
- action_common_attributes.flow
attributes:
action:
support: full
async:
support: none
become:
support: none
bypass_host_loop:
support: full
check_mode:
support: none
connection:
support: none
delegation:
support: none
diff_mode:
support: none
platform:
platforms: all
notes:
- Starting in 2.2, if you specify 0 or negative for minutes or seconds, it will wait for 1 second, previously it would wait indefinitely.
- This module is also supported for Windows targets.
- User input is not captured or echoed, regardless of echo setting, when minutes or seconds is specified.
'''

@ -28,14 +28,21 @@ options:
- If this parameter is set to C(crash), the module will cause an exception.
type: str
default: pong
extends_documentation_fragment:
- action_common_attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
platform:
platforms: posix
seealso:
- module: ansible.netcommon.net_ping
- module: ansible.windows.win_ping
author:
- Ansible Core Team
- Michael DeHaan
notes:
- Supports C(check_mode).
'''
EXAMPLES = '''

@ -112,6 +112,15 @@ options:
to specify desired umask mode as an octal string, (e.g., "0022").
type: str
version_added: "2.1"
extends_documentation_fragment:
- action_common_attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
platform:
platforms: posix
notes:
- The virtualenv (U(http://www.virtualenv.org/)) must be
installed on the remote host if the virtualenv parameter is specified and

@ -39,6 +39,19 @@ description:
- This module does not require python on the remote system, much like
the M(ansible.builtin.script) module.
- This module is also supported for Windows targets.
extends_documentation_fragment:
- action_common_attributes
- action_common_attributes.raw
attributes:
check_mode:
support: none
diff_mode:
support: none
platform:
details: This action is one of the few that requires no Python on the remote as it passes the command directly into the connection string
platforms: all
raw:
support: full
notes:
- "If using raw from a playbook, you may need to disable fact gathering
using C(gather_facts: no) if you're using C(raw) to bootstrap python
@ -48,7 +61,6 @@ notes:
- The C(environment) keyword does not work with raw normally, it requires a shell
which means it only works if C(executable) is set or using the module
with privilege escalation (C(become)).
- This module is also supported for Windows targets.
seealso:
- module: ansible.builtin.command
- module: ansible.builtin.shell

@ -80,6 +80,22 @@ options:
type: str
default: '[determined based on target OS]'
version_added: '2.11'
extends_documentation_fragment:
- action_common_attributes
- action_common_attributes.flow
attributes:
action:
support: full
async:
support: none
bypass_host_loop:
support: none
check_mode:
support: none
diff_mode:
support: none
platform:
platforms: posix
seealso:
- module: ansible.windows.win_reboot
author:

@ -14,8 +14,21 @@ DOCUMENTATION = r'''
module: replace
author: Evan Kaufman (@EvanK)
extends_documentation_fragment:
- action_common_attributes
- action_common_attributes.files
- files
- validate
attributes:
check_mode:
support: full
diff_mode:
support: full
platform:
platforms: posix
safe_file_operations:
support: full
vault:
support: none
short_description: Replace all instances of a particular string in a
file using a back-referenced regular expression
description:
@ -95,7 +108,6 @@ notes:
previous incorrect behavior, you may be need to adjust your tasks.
See U(https://github.com/ansible/ansible/issues/31354) for details.
- Option I(follow) has been removed in Ansible 2.5, because this module modifies the contents of the file so I(follow=no) doesn't make sense.
- Supports C(check_mode).
'''
EXAMPLES = r'''

@ -44,8 +44,15 @@ options:
- This will be used to verify the specified key.
type: str
version_added: 2.9
notes:
- Supports C(check_mode).
extends_documentation_fragment:
- action_common_attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
platform:
platforms: rhel
'''
EXAMPLES = '''

@ -47,7 +47,6 @@ notes:
stderr is sent to stdout. If you depend on separated stdout and stderr result keys, please switch to a copy+command set of tasks instead of using script.
- If the path to the local script contains spaces, it needs to be quoted.
- This module is also supported for Windows targets.
- Does not support C(check_mode).
seealso:
- module: ansible.builtin.shell
- module: ansible.windows.win_shell
@ -55,7 +54,24 @@ author:
- Ansible Core Team
- Michael DeHaan
extends_documentation_fragment:
- decrypt
- action_common_attributes
- action_common_attributes.files
- action_common_attributes.raw
- decrypt
attributes:
check_mode:
support: none
diff_mode:
support: none
platform:
details: This action is one of the few that requires no Python on the remote as it passes the command directly into the connection string
platforms: all
raw:
support: full
safe_file_operations:
support: none
vault:
support: full
'''
EXAMPLES = r'''

@ -85,9 +85,27 @@ options:
type: str
default: auto
version_added: 2.2
extends_documentation_fragment:
- action_common_attributes
- action_common_attributes.flow
attributes:
action:
support: full
async:
support: full
bypass_host_loop:
support: none
check_mode:
details: support depends on the underlying plugin invoked
support: N/A
diff_mode:
details: support depends on the underlying plugin invoked
support: N/A
platform:
details: The support depends on the availability for the specific plugin for each platform and if fact gathering is able to detect it
platforms: all
notes:
- For AIX, group subsystem names can be used.
- Supports C(check_mode).
seealso:
- module: ansible.windows.win_service
author:

@ -16,7 +16,18 @@ description:
- Return service state information as fact data for various service management utilities.
version_added: "2.5"
requirements: ["Any of the following supported init systems: systemd, sysv, upstart, AIX SRC"]
extends_documentation_fragment:
- action_common_attributes
- action_common_attributes.facts
attributes:
check_mode:
support: full
diff_mode:
support: none
facts:
support: full
platform:
platforms: posix
notes:
- When accessing the C(ansible_facts.services) facts collected by this module,
it is recommended to not use "dot notation" because services can have a C(-)
@ -25,8 +36,6 @@ notes:
using the string value of the service name as the key in order to obtain
the fact data value like C(ansible_facts.services['zuul-gateway'])
- AIX SRC was added in version 2.11.
- Supports C(check_mode).
author:
- Adam Miller (@maxamillion)
'''

@ -39,6 +39,31 @@ options:
type: bool
default: no
version_added: "2.4"
extends_documentation_fragment:
- action_common_attributes
- action_common_attributes.conn
- action_common_attributes.flow
- action_core
attributes:
action:
details: While the action plugin does do some of the work it relies on the core engine to actually create the variables, that part cannot be overriden
support: partial
bypass_host_loop:
support: none
bypass_task_loop:
support: none
check_mode:
support: full
core:
details: While parts of this action are implemented in core, other parts are still available as normal plugins and can be partially overridden
support: partial
delegation:
details:
- while variable assignment can be delegated to a different host the execution context is always the current invenotory_hostname
- connection variables, if set at all, would reflect the host it would target, even if we are not connecting at all in this case
support: partial
diff_mode:
support: none
notes:
- Because of the nature of tasks, set_fact will produce 'static' values for a variable.
Unlike normal 'lazy' variables, the value gets evaluated and templated on assignment.
@ -48,7 +73,6 @@ notes:
Using the setting will restrict k=v to strings, but will allow you to specify string or boolean in YAML.
- "To create lists/arrays or dictionary/hashes use YAML notation C(var: [val1, val2])."
- Since 'cacheable' is now a module param, 'cacheable' is no longer a valid fact name.
- This action does not use a connection and always executes on the controller.
seealso:
- module: ansible.builtin.include_vars
- ref: ansible_variable_precedence

@ -32,10 +32,31 @@ options:
- Whether the provided value is aggregated to the existing stat C(yes) or will replace it C(no).
type: bool
default: yes
extends_documentation_fragment:
- action_common_attributes
- action_common_attributes.conn
- action_common_attributes.flow
- action_core
attributes:
action:
details: While the action plugin does do some of the work it relies on the core engine to actually create the variables, that part cannot be overriden
support: partial
bypass_host_loop:
support: none
bypass_task_loop:
support: none
core:
details: While parts of this action are implemented in core, other parts are still available as normal plugins and can be partially overridden
support: partial
check_mode:
support: full
delegation:
support: none
diff_mode:
support: none
notes:
- In order for custom stats to be displayed, you must set C(show_custom_stats) in section C([defaults]) in C(ansible.cfg)
or by defining environment variable C(ANSIBLE_SHOW_CUSTOM_STATS) to C(yes).
- This module is also supported for Windows targets.
or by defining environment variable C(ANSIBLE_SHOW_CUSTOM_STATS) to C(yes). See the C(default) callback plugin for details.
version_added: "2.3"
'''

@ -73,6 +73,18 @@ description:
available to a host. Ansible provides many I(facts) about the system,
automatically.
- This module is also supported for Windows targets.
extends_documentation_fragment:
- action_common_attributes
- action_common_attributes.facts
attributes:
check_mode:
support: full
diff_mode:
support: none
facts:
support: full
platform:
platforms: posix, windows
notes:
- More ansible facts will be added with successive releases. If I(facter) or
I(ohai) are installed, variables from these programs will also be snapshotted
@ -84,9 +96,7 @@ notes:
- The filter option filters only the first level subkey below ansible_facts.
- If the target host is Windows, you will not currently have the ability to use
C(filter) as this is provided by a simpler implementation of the module.
- This module is also supported for Windows targets.
- This module should be run with elevated privileges on BSD systems to gather facts like ansible_product_version.
- Supports C(check_mode).
- For more information about delegated facts,
please check U(https://docs.ansible.com/ansible/latest/user_guide/playbooks_delegation.html#delegating-facts).
author:

@ -71,16 +71,26 @@ options:
type: bool
default: yes
version_added: "2.8"
extends_documentation_fragment:
- action_common_attributes
- action_common_attributes.raw
attributes:
check_mode:
details: while the command itself is arbitrary and cannot be subject to the check mode semantics it adds C(creates)/C(removes) options as a workaround
support: partial
diff_mode:
support: none
platform:
support: full
platforms: posix
raw:
support: full
notes:
- If you want to execute a command securely and predictably, it may be
better to use the M(ansible.builtin.command) module instead. Best practices
when writing playbooks will follow the trend of using M(ansible.builtin.command)
unless the M(ansible.builtin.shell) module is explicitly required. When running ad-hoc
commands, use your best judgement.
- Check mode is supported when passing C(creates) or C(removes). If running
in check mode and either of these are specified, the module will check for
the existence of the file and report the correct changed status. If these
are not supplied, the task will be skipped.
- To sanitize any variables passed to the shell module, you should use
C({{ var | quote }}) instead of just C({{ var }}) to make sure they
do not include evil things like semicolons.

@ -24,11 +24,18 @@ options:
type: path
required: true
aliases: [ path ]
extends_documentation_fragment:
- action_common_attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
platform:
platforms: posix, windows
notes:
- This module returns an 'in memory' base64 encoded version of the file, take
into account that this will require at least twice the RAM as the original file size.
- This module is also supported for Windows targets.
- Supports C(check_mode).
seealso:
- module: ansible.builtin.fetch
author:

@ -61,11 +61,18 @@ options:
default: yes
aliases: [ attr, attributes ]
version_added: "2.3"
extends_documentation_fragment:
- action_common_attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
platform:
platforms: posix
seealso:
- module: ansible.builtin.file
- module: ansible.windows.win_stat
notes:
- Supports C(check_mode).
author: Bruce Pennypacker (@bpennypacker)
'''

@ -17,9 +17,6 @@ description:
version_added: "0.7"
author:
- Dane Summers (@dsummersl) <njharman@gmail.com>
notes:
- This module does not handle externals.
- Supports C(check_mode).
options:
repo:
description:
@ -98,6 +95,16 @@ options:
default: "no"
version_added: "2.11"
type: bool
extends_documentation_fragment: action_common_attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
platform:
platforms: posix
notes:
- This module does not handle externals.
requirements:
- subversion (the command line tool with C(svn) entrypoint)

@ -77,12 +77,20 @@ options:
type: bool
default: no
version_added: "2.3"
extends_documentation_fragment: action_common_attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
platform:
platforms: posix
notes:
- Since 2.4, one of the following options is required C(state), C(enabled), C(masked), C(daemon_reload), (C(daemon_reexec) since 2.8),
and all except C(daemon_reload) and (C(daemon_reexec) since 2.8) also require C(name).
- Before 2.4 you always required C(name).
- Globs are not supported in name, i.e ``postgres*.service``.
- Supports C(check_mode).
- The service names might vary by specific OS/distribution
requirements:
- A system managed by systemd.
'''

@ -66,8 +66,17 @@ options:
tty or the service dying when the task is over as the connection
closes the session.
default: no
extends_documentation_fragment: action_common_attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
platform:
platforms: posix
notes:
- One option other than name is required.
- The service names might vary by specific OS/distribution
requirements:
- That the service managed has a corresponding init script.
'''

@ -41,6 +41,14 @@ options:
- Suffix of file/directory name created by module.
type: str
default: ""
extends_documentation_fragment: action_common_attributes
attributes:
check_mode:
support: none
diff_mode:
support: none
platform:
platforms: posix
seealso:
- module: ansible.builtin.file
- module: ansible.windows.win_tempfile

@ -35,10 +35,30 @@ author:
- Ansible Core Team
- Michael DeHaan
extends_documentation_fragment:
- action_common_attributes
- action_common_attributes.flow
- action_common_attributes.files
- backup
- files
- template_common
- validate
attributes:
action:
support: full
async:
support: none
bypass_host_loop:
support: none
check_mode:
support: full
diff_mode:
support: full
platform:
platforms: posix
safe_file_operations:
support: full
vault:
support: full
'''
EXAMPLES = r'''

@ -109,8 +109,29 @@ options:
default: yes
version_added: "2.2"
extends_documentation_fragment:
- action_common_attributes
- action_common_attributes.flow
- action_common_attributes.files
- decrypt
- files
attributes:
action:
support: full
async:
support: none
bypass_host_loop:
support: none
check_mode:
support: full
diff_mode:
support: partial
details: Uses gtar's C(--diff) arg to calculate if changed or not. If this C(arg) is not supported, it will always unpack the archive.
platform:
platforms: posix
safe_file_operations:
support: none
vault:
support: full
todo:
- Re-implement tar support using native tarfile module.
- Re-implement zip support using native zipfile module.
@ -119,13 +140,10 @@ notes:
- Requires C(zstd) command on target host to expand I(.tar.zst) files.
- Can handle I(.zip) files using C(unzip) as well as I(.tar), I(.tar.gz), I(.tar.bz2), I(.tar.xz), and I(.tar.zst) files using C(gtar).
- Does not handle I(.gz) files, I(.bz2) files, I(.xz), or I(.zst) files that do not contain a I(.tar) archive.
- Uses gtar's C(--diff) arg to calculate if changed or not. If this C(arg) is not
supported, it will always unpack the archive.
- Existing files/directories in the destination which are not in the archive
are not touched. This is the same behavior as a normal archive extraction.
- Existing files/directories in the destination which are not in the archive
are ignored for purposes of deciding if the archive should be unpacked or not.
- Supports C(check_mode).
seealso:
- module: community.general.archive
- module: community.general.iso_extract

@ -201,6 +201,16 @@ options:
type: bool
default: no
version_added: '2.11'
extends_documentation_fragment:
- action_common_attributes
- files
attributes:
check_mode:
support: none
diff_mode:
support: none
platform:
platforms: posix
notes:
- The dependency on httplib2 was removed in Ansible 2.1.
- The module returns all the HTTP headers in lower-case.
@ -210,7 +220,6 @@ seealso:
- module: ansible.windows.win_uri
author:
- Romeo Theriault (@romeotheriault)
extends_documentation_fragment: files
'''
EXAMPLES = r'''

@ -258,7 +258,14 @@ options:
- Requires C(local) is omitted or False.
type: str
version_added: "2.12"
extends_documentation_fragment: action_common_attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
platform:
platforms: posix
notes:
- There are specific requirements per platform on user management utilities. However
they generally come pre-installed with the system and Ansible will require they
@ -272,7 +279,6 @@ notes:
C(pw userdel) remove, C(pw lock) to lock, and C(pw unlock) to unlock accounts.
- On all other platforms, this module uses C(useradd) to create, C(usermod) to modify, and
C(userdel) to remove accounts.
- Supports C(check_mode).
seealso:
- module: ansible.posix.authorized_key
- module: ansible.builtin.group

@ -25,6 +25,29 @@ options:
- A dictionary of the arguments that will be validated according to argument_spec
author:
- Ansible Core Team
extends_documentation_fragment:
- action_common_attributes
- action_common_attributes.conn
- action_common_attributes.flow
attributes:
action:
support: full
async:
support: none
become:
support: none
bypass_host_loop:
support: none
connection:
support: none
check_mode:
support: none
delegation:
support: none
diff_mode:
support: none
platform:
platforms: all
'''
EXAMPLES = r'''

@ -98,6 +98,14 @@ options:
- This overrides the normal error message from a failure to meet the required conditions.
type: str
version_added: "2.4"
extends_documentation_fragment: action_common_attributes
attributes:
check_mode:
support: full
diff_mode:
support: none
platform:
platforms: posix
notes:
- The ability to use search_regex with a port connection was added in Ansible 1.7.
- Prior to Ansible 2.4, testing for the absence of a directory or UNIX socket did not work correctly.

@ -40,8 +40,23 @@ options:
- Maximum number of seconds to wait for.
type: int
default: 600
notes:
- This module is also supported for Windows targets.
extends_documentation_fragment:
- action_common_attributes
- action_common_attributes.flow
attributes:
action:
support: full
async:
support: none
bypass_host_loop:
support: none
check_mode:
support: none
diff_mode:
support: none
platform:
details: As long as there is a connection plugin
platforms: all
seealso:
- module: ansible.builtin.wait_for
- module: ansible.windows.win_wait_for

@ -16,14 +16,14 @@ attributes:
description: Will return details on what has changed (or possibly needs changing in check_mode), when in diff mode
platform:
description: Target OS/families that can be operated against
support: full
support: N/A
'''
ACTIONGROUPS = r'''
attributes:
action_group:
description: Action is part of action_group(s), for convenient setting of module_defaults.
support: none
support: N/A
membership: []
'''

Loading…
Cancel
Save