Reduce ignored module sanity tests (#70319)

* Reorder test/sanity/ignore.txt to better see changes
* Remove extra empty line causing pass fail
* Apply suggestions made by Akasurde
* Minor fix in package_facts and remove two unnecessary ignores
* Fix subversion based on a suggestion made by felixfontein
* Apply suggestions made by felixfontein and Andersson007
* Fix subversion.py as suggested by felixfontein
* Minor reformatting in yum_repository description
* Reformat changelog
* Add key to apt_key, add deprecated changelog
* Add PR url to changelog
* Ignore paramater-type-not-in-doc in favour of adding key back to apt_key
* Fix apt_key
* Remove undocumented-paramater from apt_key ignore
* Ignore doc-choices-do-not-match-spec in package_facts
* Fix package_facts
* Fix filter option in setup module
This commit is contained in:
Amin Vakil 2020-09-22 23:37:29 +03:30 committed by GitHub
parent 606924a4b4
commit 3e9943bc5e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 199 additions and 76 deletions

View file

@ -0,0 +1,4 @@
bugfixes:
- apt_repository - fixes ``mode`` doc to remove ineffective default (https://github.com/ansible/ansible/pull/70319).
deprecated_features:
- apt_key - the paramater ``key`` does not have any effect, has been deprecated and will be removed in ansible-base version 2.14 (https://github.com/ansible/ansible/pull/70319).

View file

@ -29,13 +29,13 @@ yumdnf_argument_spec = dict(
conf_file=dict(type='str'), conf_file=dict(type='str'),
disable_excludes=dict(type='str', default=None), disable_excludes=dict(type='str', default=None),
disable_gpg_check=dict(type='bool', default=False), disable_gpg_check=dict(type='bool', default=False),
disable_plugin=dict(type='list', default=[]), disable_plugin=dict(type='list', elements='str', default=[]),
disablerepo=dict(type='list', default=[]), disablerepo=dict(type='list', elements='str', default=[]),
download_only=dict(type='bool', default=False), download_only=dict(type='bool', default=False),
download_dir=dict(type='str', default=None), download_dir=dict(type='str', default=None),
enable_plugin=dict(type='list', default=[]), enable_plugin=dict(type='list', elements='str', default=[]),
enablerepo=dict(type='list', default=[]), enablerepo=dict(type='list', elements='str', default=[]),
exclude=dict(type='list', default=[]), exclude=dict(type='list', elements='str', default=[]),
installroot=dict(type='str', default="/"), installroot=dict(type='str', default="/"),
install_repoquery=dict(type='bool', default=True), install_repoquery=dict(type='bool', default=True),
install_weak_deps=dict(type='bool', default=True), install_weak_deps=dict(type='bool', default=True),

View file

@ -30,11 +30,13 @@ options:
description: description:
- Indicates the desired package state. C(latest) ensures that the latest version is installed. C(build-dep) ensures the package build dependencies - Indicates the desired package state. C(latest) ensures that the latest version is installed. C(build-dep) ensures the package build dependencies
are installed. C(fixed) attempt to correct a system with broken dependencies in place. are installed. C(fixed) attempt to correct a system with broken dependencies in place.
type: str
default: present default: present
choices: [ absent, build-dep, latest, present, fixed ] choices: [ absent, build-dep, latest, present, fixed ]
update_cache: update_cache:
description: description:
- Run the equivalent of C(apt-get update) before the operation. Can be run as part of the package installation or as a separate step. - Run the equivalent of C(apt-get update) before the operation. Can be run as part of the package installation or as a separate step.
aliases: [ update-cache ]
type: bool type: bool
default: 'no' default: 'no'
update_cache_retries: update_cache_retries:
@ -53,6 +55,7 @@ options:
description: description:
- Update the apt cache if its older than the I(cache_valid_time). This option is set in seconds. - Update the apt cache if its older than the I(cache_valid_time). This option is set in seconds.
- As of Ansible 2.4, if explicitly set, this sets I(update_cache=yes). - As of Ansible 2.4, if explicitly set, this sets I(update_cache=yes).
type: int
default: 0 default: 0
purge: purge:
description: description:
@ -62,11 +65,13 @@ options:
default_release: default_release:
description: description:
- Corresponds to the C(-t) option for I(apt) and sets pin priorities - Corresponds to the C(-t) option for I(apt) and sets pin priorities
aliases: [ default-release ]
type: str
install_recommends: install_recommends:
description: description:
- Corresponds to the C(--no-install-recommends) option for I(apt). C(yes) installs recommended packages. C(no) does not install - Corresponds to the C(--no-install-recommends) option for I(apt). C(yes) installs recommended packages. C(no) does not install
recommended packages. By default, Ansible will use the same defaults as the operating system. Suggested packages are never installed. recommended packages. By default, Ansible will use the same defaults as the operating system. Suggested packages are never installed.
aliases: ['install-recommends'] aliases: [ install-recommends ]
type: bool type: bool
force: force:
description: description:
@ -82,6 +87,7 @@ options:
description: description:
- Ignore if packages cannot be authenticated. This is useful for bootstrapping environments that manage their own apt-key setup. - Ignore if packages cannot be authenticated. This is useful for bootstrapping environments that manage their own apt-key setup.
- 'C(allow_unauthenticated) is only supported with state: I(install)/I(present)' - 'C(allow_unauthenticated) is only supported with state: I(install)/I(present)'
aliases: [ allow-unauthenticated ]
type: bool type: bool
default: 'no' default: 'no'
version_added: "2.1" version_added: "2.1"
@ -95,16 +101,19 @@ options:
version_added: "1.1" version_added: "1.1"
choices: [ dist, full, 'no', safe, 'yes' ] choices: [ dist, full, 'no', safe, 'yes' ]
default: 'no' default: 'no'
type: str
dpkg_options: dpkg_options:
description: description:
- Add dpkg options to apt command. Defaults to '-o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold"' - Add dpkg options to apt command. Defaults to '-o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold"'
- Options should be supplied as comma separated list - Options should be supplied as comma separated list
default: force-confdef,force-confold default: force-confdef,force-confold
type: str
deb: deb:
description: description:
- Path to a .deb package on the remote machine. - Path to a .deb package on the remote machine.
- If :// in the path, ansible will attempt to download deb before installing. (Version added 2.1) - If :// in the path, ansible will attempt to download deb before installing. (Version added 2.1)
- Requires the C(xz-utils) package to extract the control file of the deb package to install. - Requires the C(xz-utils) package to extract the control file of the deb package to install.
type: path
required: false required: false
version_added: "1.6" version_added: "1.6"
autoremove: autoremove:
@ -1050,7 +1059,7 @@ def main():
default_release=dict(type='str', aliases=['default-release']), default_release=dict(type='str', aliases=['default-release']),
install_recommends=dict(type='bool', aliases=['install-recommends']), install_recommends=dict(type='bool', aliases=['install-recommends']),
force=dict(type='bool', default=False), force=dict(type='bool', default=False),
upgrade=dict(type='str', choices=['dist', 'full', 'no', 'safe', 'yes']), upgrade=dict(type='str', choices=['dist', 'full', 'no', 'safe', 'yes'], default='no'),
dpkg_options=dict(type='str', default=DPKG_OPTIONS), dpkg_options=dict(type='str', default=DPKG_OPTIONS),
autoremove=dict(type='bool', default=False), autoremove=dict(type='bool', default=False),
autoclean=dict(type='bool', default=False), autoclean=dict(type='bool', default=False),

View file

@ -35,26 +35,33 @@ options:
- Including this allows check mode to correctly report the changed state. - Including this allows check mode to correctly report the changed state.
- If specifying a subkey's id be aware that apt-key does not understand how to remove keys via a subkey id. Specify the primary key's id instead. - If specifying a subkey's id be aware that apt-key does not understand how to remove keys via a subkey id. Specify the primary key's id instead.
- This parameter is required when C(state) is set to C(absent). - This parameter is required when C(state) is set to C(absent).
type: str
data: data:
description: description:
- The keyfile contents to add to the keyring. - The keyfile contents to add to the keyring.
type: str
file: file:
description: description:
- The path to a keyfile on the remote server to add to the keyring. - The path to a keyfile on the remote server to add to the keyring.
type: path
keyring: keyring:
description: description:
- The full path to specific keyring file in /etc/apt/trusted.gpg.d/ - The full path to specific keyring file in /etc/apt/trusted.gpg.d/
type: path
version_added: "1.3" version_added: "1.3"
url: url:
description: description:
- The URL to retrieve key from. - The URL to retrieve key from.
type: str
keyserver: keyserver:
description: description:
- The keyserver to retrieve key from. - The keyserver to retrieve key from.
type: str
version_added: "1.6" version_added: "1.6"
state: state:
description: description:
- Ensures that the key is present (added) or absent (revoked). - Ensures that the key is present (added) or absent (revoked).
type: str
choices: [ absent, present ] choices: [ absent, present ]
default: present default: present
validate_certs: validate_certs:
@ -267,7 +274,7 @@ def main():
url=dict(type='str'), url=dict(type='str'),
data=dict(type='str'), data=dict(type='str'),
file=dict(type='path'), file=dict(type='path'),
key=dict(type='str'), key=dict(type='str', removed_in_version='2.14', removed_from_collection='ansible.builtin'),
keyring=dict(type='path'), keyring=dict(type='path'),
validate_certs=dict(type='bool', default=True), validate_certs=dict(type='bool', default=True),
keyserver=dict(type='str'), keyserver=dict(type='str'),

View file

@ -24,22 +24,26 @@ options:
repo: repo:
description: description:
- A source string for the repository. - A source string for the repository.
type: str
required: true required: true
state: state:
description: description:
- A source string state. - A source string state.
type: str
choices: [ absent, present ] choices: [ absent, present ]
default: "present" default: "present"
mode: mode:
description: description:
- The octal mode for newly created files in sources.list.d - The octal mode for newly created files in sources.list.d.
default: '0644' - Default is what system uses (probably 0644).
type: raw
version_added: "1.6" version_added: "1.6"
update_cache: update_cache:
description: description:
- Run the equivalent of C(apt-get update) when a change occurs. Cache updates are run after making changes. - Run the equivalent of C(apt-get update) when a change occurs. Cache updates are run after making changes.
type: bool type: bool
default: "yes" default: "yes"
aliases: [ update-cache ]
update_cache_retries: update_cache_retries:
description: description:
- Amount of retries if the cache update fails. Also see I(update_cache_retry_max_delay). - Amount of retries if the cache update fails. Also see I(update_cache_retry_max_delay).
@ -64,11 +68,13 @@ options:
- Sets the name of the source list file in sources.list.d. - Sets the name of the source list file in sources.list.d.
Defaults to a file name based on the repository source url. Defaults to a file name based on the repository source url.
The .list extension will be automatically added. The .list extension will be automatically added.
type: str
version_added: '2.1' version_added: '2.1'
codename: codename:
description: description:
- Override the distribution codename to use for PPA repositories. - Override the distribution codename to use for PPA repositories.
Should usually only be set when working with a PPA on a non-Ubuntu target (e.g. Debian or Mint) Should usually only be set when working with a PPA on a non-Ubuntu target (e.g. Debian or Mint)
type: str
version_added: '2.3' version_added: '2.3'
author: author:
- Alexander Saltanov (@sashka) - Alexander Saltanov (@sashka)

View file

@ -37,6 +37,7 @@ options:
- The command to run. - The command to run.
argv: argv:
type: list type: list
elements: str
description: description:
- Passes the command as a list rather than a string. - Passes the command as a list rather than a string.
- Use C(argv) to avoid quoting values that would otherwise be interpreted incorrectly (for example "user name"). - Use C(argv) to avoid quoting values that would otherwise be interpreted incorrectly (for example "user name").
@ -67,6 +68,7 @@ options:
stdin: stdin:
description: description:
- Set the stdin of the command directly to the specified value. - Set the stdin of the command directly to the specified value.
type: str
version_added: "2.4" version_added: "2.4"
stdin_add_newline: stdin_add_newline:
type: bool type: bool
@ -255,7 +257,7 @@ def main():
argument_spec=dict( argument_spec=dict(
_raw_params=dict(), _raw_params=dict(),
_uses_shell=dict(type='bool', default=False), _uses_shell=dict(type='bool', default=False),
argv=dict(type='list'), argv=dict(type='list', elements='str'),
chdir=dict(type='path'), chdir=dict(type='path'),
executable=dict(), executable=dict(),
creates=dict(type='path'), creates=dict(type='path'),

View file

@ -34,6 +34,7 @@ options:
list: list:
description: description:
- Various (non-idempotent) commands for usage with C(/usr/bin/ansible) and I(not) playbooks. See examples. - Various (non-idempotent) commands for usage with C(/usr/bin/ansible) and I(not) playbooks. See examples.
type: str
state: state:
description: description:
@ -41,22 +42,28 @@ options:
- Default is C(None), however in effect the default action is C(present) unless the C(autoremove) option is - Default is C(None), however in effect the default action is C(present) unless the C(autoremove) option is
enabled for this module, then C(absent) is inferred. enabled for this module, then C(absent) is inferred.
choices: ['absent', 'present', 'installed', 'removed', 'latest'] choices: ['absent', 'present', 'installed', 'removed', 'latest']
type: str
enablerepo: enablerepo:
description: description:
- I(Repoid) of repositories to enable for the install/update operation. - I(Repoid) of repositories to enable for the install/update operation.
These repos will not persist beyond the transaction. These repos will not persist beyond the transaction.
When specifying multiple repos, separate them with a ",". When specifying multiple repos, separate them with a ",".
type: list
elements: str
disablerepo: disablerepo:
description: description:
- I(Repoid) of repositories to disable for the install/update operation. - I(Repoid) of repositories to disable for the install/update operation.
These repos will not persist beyond the transaction. These repos will not persist beyond the transaction.
When specifying multiple repos, separate them with a ",". When specifying multiple repos, separate them with a ",".
type: list
elements: str
conf_file: conf_file:
description: description:
- The remote dnf configuration file to use for the transaction. - The remote dnf configuration file to use for the transaction.
type: str
disable_gpg_check: disable_gpg_check:
description: description:
@ -73,12 +80,14 @@ options:
will be installed. will be installed.
version_added: "2.3" version_added: "2.3"
default: "/" default: "/"
type: str
releasever: releasever:
description: description:
- Specifies an alternative release from which all packages will be - Specifies an alternative release from which all packages will be
installed. installed.
version_added: "2.6" version_added: "2.6"
type: str
autoremove: autoremove:
description: description:
@ -93,6 +102,8 @@ options:
- Package name(s) to exclude when state=present, or latest. This can be a - Package name(s) to exclude when state=present, or latest. This can be a
list or a comma separated string. list or a comma separated string.
version_added: "2.7" version_added: "2.7"
type: list
elements: str
skip_broken: skip_broken:
description: description:
- Skip packages with broken dependencies(devsolve) and are causing problems. - Skip packages with broken dependencies(devsolve) and are causing problems.
@ -131,11 +142,15 @@ options:
- I(Plugin) name to enable for the install/update operation. - I(Plugin) name to enable for the install/update operation.
The enabled plugin will not persist beyond the transaction. The enabled plugin will not persist beyond the transaction.
version_added: "2.7" version_added: "2.7"
type: list
elements: str
disable_plugin: disable_plugin:
description: description:
- I(Plugin) name to disable for the install/update operation. - I(Plugin) name to disable for the install/update operation.
The disabled plugins will not persist beyond the transaction. The disabled plugins will not persist beyond the transaction.
version_added: "2.7" version_added: "2.7"
type: list
elements: str
disable_excludes: disable_excludes:
description: description:
- Disable the excludes defined in DNF config files. - Disable the excludes defined in DNF config files.
@ -143,6 +158,7 @@ options:
- If set to C(main), disable excludes defined in [main] in dnf.conf. - If set to C(main), disable excludes defined in [main] in dnf.conf.
- If set to C(repoid), disable excludes defined for given repo id. - If set to C(repoid), disable excludes defined for given repo id.
version_added: "2.7" version_added: "2.7"
type: str
validate_certs: validate_certs:
description: description:
- This only applies if using a https url as the source of the rpm. e.g. for localinstall. If set to C(no), the SSL certificates will not be validated. - This only applies if using a https url as the source of the rpm. e.g. for localinstall. If set to C(no), the SSL certificates will not be validated.

View file

@ -20,13 +20,15 @@ author:
options: options:
name: name:
description: description:
- Name of the package - Name of the package.
required: true required: true
type: str
selection: selection:
description: description:
- The selection state to set the package to. - The selection state to set the package to.
choices: [ 'install', 'hold', 'deinstall', 'purge' ] choices: [ 'install', 'hold', 'deinstall', 'purge' ]
required: true required: true
type: str
notes: notes:
- This module won't cause any packages to be installed/removed/purged, use the C(apt) module for that. - This module won't cause any packages to be installed/removed/purged, use the C(apt) module for that.
''' '''
@ -44,7 +46,7 @@ def main():
module = AnsibleModule( module = AnsibleModule(
argument_spec=dict( argument_spec=dict(
name=dict(required=True), name=dict(required=True),
selection=dict(choices=['install', 'hold', 'deinstall', 'purge']) selection=dict(choices=['install', 'hold', 'deinstall', 'purge'], required=True)
), ),
supports_check_mode=True, supports_check_mode=True,
) )

View file

@ -23,6 +23,7 @@ options:
description: description:
- The command module takes command to run. - The command module takes command to run.
required: true required: true
type: str
creates: creates:
type: path type: path
description: description:

View file

@ -78,6 +78,7 @@ options:
This option is deprecated and will be removed in version 2.14. Use This option is deprecated and will be removed in version 2.14. Use
option C(checksum) instead. option C(checksum) instead.
default: '' default: ''
type: str
version_added: "1.3" version_added: "1.3"
checksum: checksum:
description: description:

View file

@ -21,20 +21,24 @@ options:
description: description:
- The name of a getent database supported by the target system (passwd, group, - The name of a getent database supported by the target system (passwd, group,
hosts, etc). hosts, etc).
type: str
required: True required: True
key: key:
description: description:
- Key from which to return values from the specified database, otherwise the - Key from which to return values from the specified database, otherwise the
full contents are returned. full contents are returned.
type: str
default: '' default: ''
service: service:
description: description:
- Override all databases with the specified service - Override all databases with the specified service
- The underlying system must support the service flag which is not always available. - The underlying system must support the service flag which is not always available.
type: str
version_added: "2.9" version_added: "2.9"
split: split:
description: description:
- "Character used to split the database values into lists/arrays such as ':' or '\t', otherwise it will try to pick one depending on the database." - "Character used to split the database values into lists/arrays such as ':' or '\t', otherwise it will try to pick one depending on the database."
type: str
fail_key: fail_key:
description: description:
- If a supplied key is missing this will make the task fail if C(yes). - If a supplied key is missing this will make the task fail if C(yes).

View file

@ -22,12 +22,14 @@ options:
repo: repo:
description: description:
- git, SSH, or HTTP(S) protocol address of the git repository. - git, SSH, or HTTP(S) protocol address of the git repository.
type: str
required: true required: true
aliases: [ name ] aliases: [ name ]
dest: dest:
description: description:
- The path of where the repository should be checked out. This - The path of where the repository should be checked out. This
parameter is required, unless C(clone) is set to C(no). parameter is required, unless C(clone) is set to C(no).
type: path
required: true required: true
version: version:
description: description:
@ -35,6 +37,7 @@ options:
the literal string C(HEAD), a branch name, a tag name. the literal string C(HEAD), a branch name, a tag name.
It can also be a I(SHA-1) hash, in which case C(refspec) needs It can also be a I(SHA-1) hash, in which case C(refspec) needs
to be specified if the given revision is not already available. to be specified if the given revision is not already available.
type: str
default: "HEAD" default: "HEAD"
accept_hostkey: accept_hostkey:
description: description:
@ -50,10 +53,12 @@ options:
An example value could be "-o StrictHostKeyChecking=no" An example value could be "-o StrictHostKeyChecking=no"
(although this particular option is better set via (although this particular option is better set via
C(accept_hostkey)). C(accept_hostkey)).
type: str
version_added: "1.5" version_added: "1.5"
key_file: key_file:
description: description:
- Specify an optional private key file path, on the target host, to use for the checkout. - Specify an optional private key file path, on the target host, to use for the checkout.
type: path
version_added: "1.5" version_added: "1.5"
reference: reference:
description: description:
@ -62,6 +67,7 @@ options:
remote: remote:
description: description:
- Name of the remote. - Name of the remote.
type: str
default: "origin" default: "origin"
refspec: refspec:
description: description:
@ -71,6 +77,7 @@ options:
the I(SHA-1). the I(SHA-1).
Uses the same syntax as the C(git fetch) command. Uses the same syntax as the C(git fetch) command.
An example value could be "refs/meta/config". An example value could be "refs/meta/config".
type: str
version_added: "1.9" version_added: "1.9"
force: force:
description: description:
@ -86,6 +93,7 @@ options:
- Create a shallow clone with a history truncated to the specified - Create a shallow clone with a history truncated to the specified
number or revisions. The minimum possible value is C(1), otherwise number or revisions. The minimum possible value is C(1), otherwise
ignored. Needs I(git>=1.9.1) to work correctly. ignored. Needs I(git>=1.9.1) to work correctly.
type: int
version_added: "1.2" version_added: "1.2"
clone: clone:
description: description:
@ -105,6 +113,7 @@ options:
description: description:
- Path to git executable to use. If not supplied, - Path to git executable to use. If not supplied,
the normal mechanism for resolving binary paths will be used. the normal mechanism for resolving binary paths will be used.
type: path
version_added: "1.4" version_added: "1.4"
bare: bare:
description: description:
@ -117,6 +126,7 @@ options:
description: description:
- The umask to set before doing any checkouts, or any other - The umask to set before doing any checkouts, or any other
repository maintenance. repository maintenance.
type: raw
version_added: "2.2" version_added: "2.2"
recursive: recursive:
@ -163,6 +173,7 @@ options:
Allowed archive formats ["zip", "tar.gz", "tar", "tgz"] Allowed archive formats ["zip", "tar.gz", "tar", "tgz"]
- This will clone and perform git archive from local directory as not - This will clone and perform git archive from local directory as not
all git servers support git archive. all git servers support git archive.
type: path
version_added: "2.4" version_added: "2.4"
archive_prefix: archive_prefix:
@ -175,6 +186,7 @@ options:
description: description:
- The path to place the cloned repository. If specified, Git repository - The path to place the cloned repository. If specified, Git repository
can be separated from working tree. can be separated from working tree.
type: path
version_added: "2.7" version_added: "2.7"
gpg_whitelist: gpg_whitelist:
@ -184,6 +196,7 @@ options:
- Only used when I(verify_commit=yes). - Only used when I(verify_commit=yes).
- Use of this feature requires Git 2.6+ due to its reliance on git's C(--raw) flag to C(verify-commit) and C(verify-tag). - Use of this feature requires Git 2.6+ due to its reliance on git's C(--raw) flag to C(verify-commit) and C(verify-tag).
type: list type: list
elements: str
default: [] default: []
version_added: "2.9" version_added: "2.9"
@ -1081,7 +1094,7 @@ def main():
clone=dict(default='yes', type='bool'), clone=dict(default='yes', type='bool'),
update=dict(default='yes', type='bool'), update=dict(default='yes', type='bool'),
verify_commit=dict(default='no', type='bool'), verify_commit=dict(default='no', type='bool'),
gpg_whitelist=dict(default=[], type='list'), gpg_whitelist=dict(default=[], type='list', elements='str'),
accept_hostkey=dict(default='no', type='bool'), accept_hostkey=dict(default='no', type='bool'),
key_file=dict(default=None, type='path', required=False), key_file=dict(default=None, type='path', required=False),
ssh_opts=dict(default=None, required=False), ssh_opts=dict(default=None, required=False),

View file

@ -25,12 +25,14 @@ options:
name: name:
description: description:
- Name of the host - Name of the host
type: str
required: true required: true
use: use:
description: description:
- Which strategy to use to update the hostname. - Which strategy to use to update the hostname.
- If not set we try to autodetect, but this can be problematic, particularly with containers as they can present misleading information. - If not set we try to autodetect, but this can be problematic, particularly with containers as they can present misleading information.
choices: ['generic', 'debian', 'sles', 'redhat', 'alpine', 'systemd', 'openrc', 'openbsd', 'solaris', 'freebsd'] choices: ['generic', 'debian', 'sles', 'redhat', 'alpine', 'systemd', 'openrc', 'openbsd', 'solaris', 'freebsd']
type: str
version_added: '2.9' version_added: '2.9'
''' '''

View file

@ -118,10 +118,12 @@ options:
description: description:
- List of flags you want to examine. - List of flags you want to examine.
type: list type: list
elements: str
flags_set: flags_set:
description: description:
- Flags to be set. - Flags to be set.
type: list type: list
elements: str
match: match:
description: description:
- Specifies a match to use, that is, an extension module that tests for - Specifies a match to use, that is, an extension module that tests for
@ -130,6 +132,7 @@ options:
- Matches are evaluated first to last if specified as an array and work in short-circuit - Matches are evaluated first to last if specified as an array and work in short-circuit
fashion, i.e. if one extension yields false, evaluation will stop. fashion, i.e. if one extension yields false, evaluation will stop.
type: list type: list
elements: str
default: [] default: []
jump: jump:
description: description:
@ -268,6 +271,7 @@ options:
- C(ctstate) is a list of the connection states to match in the conntrack module. - C(ctstate) is a list of the connection states to match in the conntrack module.
- Possible states are C(INVALID), C(NEW), C(ESTABLISHED), C(RELATED), C(UNTRACKED), C(SNAT), C(DNAT) - Possible states are C(INVALID), C(NEW), C(ESTABLISHED), C(RELATED), C(UNTRACKED), C(SNAT), C(DNAT)
type: list type: list
elements: str
default: [] default: []
src_range: src_range:
description: description:
@ -667,11 +671,11 @@ def main():
to_source=dict(type='str'), to_source=dict(type='str'),
destination=dict(type='str'), destination=dict(type='str'),
to_destination=dict(type='str'), to_destination=dict(type='str'),
match=dict(type='list', default=[]), match=dict(type='list', elements='str', default=[]),
tcp_flags=dict(type='dict', tcp_flags=dict(type='dict',
options=dict( options=dict(
flags=dict(type='list'), flags=dict(type='list', elements='str'),
flags_set=dict(type='list')) flags_set=dict(type='list', elements='str'))
), ),
jump=dict(type='str'), jump=dict(type='str'),
gateway=dict(type='str'), gateway=dict(type='str'),
@ -693,7 +697,7 @@ def main():
set_dscp_mark=dict(type='str'), set_dscp_mark=dict(type='str'),
set_dscp_mark_class=dict(type='str'), set_dscp_mark_class=dict(type='str'),
comment=dict(type='str'), comment=dict(type='str'),
ctstate=dict(type='list', default=[]), ctstate=dict(type='list', elements='str', default=[]),
src_range=dict(type='str'), src_range=dict(type='str'),
dst_range=dict(type='str'), dst_range=dict(type='str'),
limit=dict(type='str'), limit=dict(type='str'),

View file

@ -24,8 +24,8 @@ options:
- The host to add or remove (must match a host specified in key). It will be converted to lowercase so that ssh-keygen can find it. - The host to add or remove (must match a host specified in key). It will be converted to lowercase so that ssh-keygen can find it.
- Must match with <hostname> or <ip> present in key attribute. - Must match with <hostname> or <ip> present in key attribute.
- For custom SSH port, C(name) needs to specify port as well. See example section. - For custom SSH port, C(name) needs to specify port as well. See example section.
required: true
type: str type: str
required: true
key: key:
description: description:
- The SSH public host key, as a string. - The SSH public host key, as a string.

View file

@ -24,6 +24,7 @@ options:
choices: ['auto', 'rpm', 'apt', 'portage', 'pkg', 'pacman', 'apk'] choices: ['auto', 'rpm', 'apt', 'portage', 'pkg', 'pacman', 'apk']
required: False required: False
type: list type: list
elements: str
strategy: strategy:
description: description:
- This option controls how the module queries the package managers on the system. - This option controls how the module queries the package managers on the system.
@ -31,6 +32,7 @@ options:
C(all) will return information for all supported and available package managers on the system. C(all) will return information for all supported and available package managers on the system.
choices: ['first', 'all'] choices: ['first', 'all']
default: 'first' default: 'first'
type: str
version_added: "2.8" version_added: "2.8"
version_added: "2.5" version_added: "2.5"
requirements: requirements:
@ -408,7 +410,7 @@ def main():
# start work # start work
global module global module
module = AnsibleModule(argument_spec=dict(manager={'type': 'list', 'default': ['auto']}, module = AnsibleModule(argument_spec=dict(manager={'type': 'list', 'elements': 'str', 'default': ['auto']},
strategy={'choices': ['first', 'all'], 'default': 'first'}), strategy={'choices': ['first', 'all'], 'default': 'first'}),
supports_check_mode=True) supports_check_mode=True)
packages = {} packages = {}

View file

@ -22,6 +22,7 @@ options:
- The name of a Python library to install or the url(bzr+,hg+,git+,svn+) of the remote package. - The name of a Python library to install or the url(bzr+,hg+,git+,svn+) of the remote package.
- This can be a list (since 2.2) and contain version specifiers (since 2.7). - This can be a list (since 2.2) and contain version specifiers (since 2.7).
type: list type: list
elements: str
version: version:
description: description:
- The version number to install of the Python library specified in the I(name) parameter. - The version number to install of the Python library specified in the I(name) parameter.

View file

@ -24,10 +24,12 @@ options:
description: description:
- Key that will be modified. Can be a url, a file on the managed node, or a keyid if the key - Key that will be modified. Can be a url, a file on the managed node, or a keyid if the key
already exists in the database. already exists in the database.
type: str
required: true required: true
state: state:
description: description:
- If the key will be imported or removed from the rpm db. - If the key will be imported or removed from the rpm db.
type: str
default: present default: present
choices: [ absent, present ] choices: [ absent, present ]
validate_certs: validate_certs:

View file

@ -28,12 +28,15 @@ options:
use C(!all,!min), and specify the particular fact subsets. use C(!all,!min), and specify the particular fact subsets.
Use the filter parameter if you do not want to display some collected Use the filter parameter if you do not want to display some collected
facts." facts."
type: list
elements: str
required: false required: false
default: "all" default: "all"
gather_timeout: gather_timeout:
version_added: "2.2" version_added: "2.2"
description: description:
- Set the default timeout in seconds for individual fact gathering. - Set the default timeout in seconds for individual fact gathering.
type: int
required: false required: false
default: 10 default: 10
filter: filter:
@ -64,6 +67,7 @@ options:
exists on the target host. Files in this path MUST be PowerShell scripts C(.ps1) exists on the target host. Files in this path MUST be PowerShell scripts C(.ps1)
which outputs an object. This object will be formatted by Ansible as json so the which outputs an object. This object will be formatted by Ansible as json so the
script should be outputting a raw hashtable, array, or other primitive object. script should be outputting a raw hashtable, array, or other primitive object.
type: path
required: false required: false
default: /etc/ansible/facts.d default: /etc/ansible/facts.d
description: description:
@ -152,7 +156,7 @@ from ansible.module_utils.facts import default_collectors
def main(): def main():
module = AnsibleModule( module = AnsibleModule(
argument_spec=dict( argument_spec=dict(
gather_subset=dict(default=["all"], required=False, type='list'), gather_subset=dict(default=["all"], required=False, type='list', elements='str'),
gather_timeout=dict(default=10, required=False, type='int'), gather_timeout=dict(default=10, required=False, type='int'),
filter=dict(default=[], required=False, type='list', elements='str'), filter=dict(default=[], required=False, type='list', elements='str'),
fact_path=dict(default='/etc/ansible/facts.d', required=False, type='path'), fact_path=dict(default='/etc/ansible/facts.d', required=False, type='path'),

View file

@ -24,17 +24,20 @@ options:
repo: repo:
description: description:
- The subversion URL to the repository. - The subversion URL to the repository.
type: str
required: true required: true
aliases: [ name, repository ] aliases: [ name, repository ]
dest: dest:
description: description:
- Absolute path where the repository should be deployed. - Absolute path where the repository should be deployed.
required: true - The destination directory must be specified unless I(checkout=no), I(update=no), and I(export=no).
type: path
revision: revision:
description: description:
- Specific revision to checkout. - Specific revision to checkout.
type: str
default: HEAD default: HEAD
aliases: [ version ] aliases: [ rev, version ]
force: force:
description: description:
- If C(yes), modified files will be discarded. If C(no), module will fail if it encounters modified files. - If C(yes), modified files will be discarded. If C(no), module will fail if it encounters modified files.
@ -51,15 +54,18 @@ options:
username: username:
description: description:
- C(--username) parameter passed to svn. - C(--username) parameter passed to svn.
type: str
password: password:
description: description:
- C(--password) parameter passed to svn when svn is less than version 1.10.0. This is not secure and - C(--password) parameter passed to svn when svn is less than version 1.10.0. This is not secure and
the password will be leaked to argv. the password will be leaked to argv.
- C(--password-from-stdin) parameter when svn is greater or equal to version 1.10.0. - C(--password-from-stdin) parameter when svn is greater or equal to version 1.10.0.
type: str
executable: executable:
description: description:
- Path to svn executable to use. If not supplied, - Path to svn executable to use. If not supplied,
the normal mechanism for resolving binary paths will be used. the normal mechanism for resolving binary paths will be used.
type: path
version_added: "1.4" version_added: "1.4"
checkout: checkout:
description: description:

View file

@ -21,11 +21,13 @@ options:
description: description:
- Name of the service. This parameter takes the name of exactly one service to work with. - Name of the service. This parameter takes the name of exactly one service to work with.
- When using in a chroot environment you always need to specify the full name i.e. (crond.service). - When using in a chroot environment you always need to specify the full name i.e. (crond.service).
type: str
aliases: [ service, unit ] aliases: [ service, unit ]
state: state:
description: description:
- C(started)/C(stopped) are idempotent actions that will not run commands unless necessary. - C(started)/C(stopped) are idempotent actions that will not run commands unless necessary.
C(restarted) will always bounce the service. C(reloaded) will always reload. C(restarted) will always bounce the service. C(reloaded) will always reload.
type: str
choices: [ reloaded, restarted, started, stopped ] choices: [ reloaded, restarted, started, stopped ]
enabled: enabled:
description: description:
@ -61,6 +63,7 @@ options:
- "For systemd to work with 'user', the executing user must have its own instance of dbus started (systemd requirement). - "For systemd to work with 'user', the executing user must have its own instance of dbus started (systemd requirement).
The user dbus process is normally started during normal login, but not during the run of Ansible tasks. The user dbus process is normally started during normal login, but not during the run of Ansible tasks.
Otherwise you will probably get a 'Failed to connect to bus: no such file or directory' error." Otherwise you will probably get a 'Failed to connect to bus: no such file or directory' error."
type: str
choices: [ system, user, global ] choices: [ system, user, global ]
default: system default: system
version_added: "2.7" version_added: "2.7"

View file

@ -22,12 +22,14 @@ options:
required: true required: true
description: description:
- Name of the service. - Name of the service.
type: str
aliases: ['service'] aliases: ['service']
state: state:
choices: [ 'started', 'stopped', 'restarted', 'reloaded' ] choices: [ 'started', 'stopped', 'restarted', 'reloaded' ]
description: description:
- C(started)/C(stopped) are idempotent actions that will not run commands unless necessary. - C(started)/C(stopped) are idempotent actions that will not run commands unless necessary.
Not all init scripts support C(restarted) nor C(reloaded) natively, so these will both trigger a stop and start as needed. Not all init scripts support C(restarted) nor C(reloaded) natively, so these will both trigger a stop and start as needed.
type: str
enabled: enabled:
type: bool type: bool
description: description:
@ -37,18 +39,23 @@ options:
description: description:
- If the service is being C(restarted) or C(reloaded) then sleep this many seconds between the stop and start command. - If the service is being C(restarted) or C(reloaded) then sleep this many seconds between the stop and start command.
This helps to workaround badly behaving services. This helps to workaround badly behaving services.
type: int
pattern: pattern:
description: description:
- A substring to look for as would be found in the output of the I(ps) command as a stand-in for a status result. - A substring to look for as would be found in the output of the I(ps) command as a stand-in for a status result.
- If the string is found, the service will be assumed to be running. - If the string is found, the service will be assumed to be running.
- "This option is mainly for use with init scripts that don't support the 'status' option." - "This option is mainly for use with init scripts that don't support the 'status' option."
type: str
runlevels: runlevels:
description: description:
- The runlevels this script should be enabled/disabled from. - The runlevels this script should be enabled/disabled from.
- Use this to override the defaults set by the package or init script itself. - Use this to override the defaults set by the package or init script itself.
type: list
elements: str
arguments: arguments:
description: description:
- Additional arguments provided on the command line that some init scripts accept. - Additional arguments provided on the command line that some init scripts accept.
type: str
aliases: [ 'args' ] aliases: [ 'args' ]
daemonize: daemonize:
type: bool type: bool
@ -124,7 +131,7 @@ def main():
sleep=dict(type='int', default=1), sleep=dict(type='int', default=1),
pattern=dict(type='str'), pattern=dict(type='str'),
arguments=dict(type='str', aliases=['args']), arguments=dict(type='str', aliases=['args']),
runlevels=dict(type='list'), runlevels=dict(type='list', elements='str'),
daemonize=dict(type='bool', default=False), daemonize=dict(type='bool', default=False),
), ),
supports_check_mode=True, supports_check_mode=True,

View file

@ -59,6 +59,7 @@ options:
description: description:
- List the directory and file entries that you would like to exclude from the unarchive action. - List the directory and file entries that you would like to exclude from the unarchive action.
type: list type: list
elements: str
version_added: "2.1" version_added: "2.1"
keep_newer: keep_newer:
description: description:
@ -72,6 +73,7 @@ options:
- Each space-separated command-line option should be a new element of the array. See examples. - Each space-separated command-line option should be a new element of the array. See examples.
- Command-line options with multiple elements must use multiple lines in the array, one for each element. - Command-line options with multiple elements must use multiple lines in the array, one for each element.
type: list type: list
elements: str
default: "" default: ""
version_added: "2.1" version_added: "2.1"
remote_src: remote_src:
@ -822,8 +824,8 @@ def main():
creates=dict(type='path'), creates=dict(type='path'),
list_files=dict(type='bool', default=False), list_files=dict(type='bool', default=False),
keep_newer=dict(type='bool', default=False), keep_newer=dict(type='bool', default=False),
exclude=dict(type='list', default=[]), exclude=dict(type='list', elements='str', default=[]),
extra_opts=dict(type='list', default=[]), extra_opts=dict(type='list', elements='str', default=[]),
validate_certs=dict(type='bool', default=True), validate_certs=dict(type='bool', default=True),
), ),
add_file_common_args=True, add_file_common_args=True,

View file

@ -107,6 +107,7 @@ options:
description: description:
- A list of valid, numeric, HTTP status codes that signifies success of the request. - A list of valid, numeric, HTTP status codes that signifies success of the request.
type: list type: list
elements: str
default: [ 200 ] default: [ 200 ]
timeout: timeout:
description: description:
@ -168,6 +169,7 @@ options:
unix_socket: unix_socket:
description: description:
- Path to Unix domain socket to use for connection - Path to Unix domain socket to use for connection
type: path
version_added: '2.8' version_added: '2.8'
http_agent: http_agent:
description: description:
@ -618,7 +620,7 @@ def main():
follow_redirects=dict(type='str', default='safe', choices=['all', 'no', 'none', 'safe', 'urllib2', 'yes']), follow_redirects=dict(type='str', default='safe', choices=['all', 'no', 'none', 'safe', 'urllib2', 'yes']),
creates=dict(type='path'), creates=dict(type='path'),
removes=dict(type='path'), removes=dict(type='path'),
status_code=dict(type='list', default=[200]), status_code=dict(type='list', elements='str', default=[200]),
timeout=dict(type='int', default=30), timeout=dict(type='int', default=30),
headers=dict(type='dict', default={}), headers=dict(type='dict', default={}),
unix_socket=dict(type='path'), unix_socket=dict(type='path'),

View file

@ -57,6 +57,7 @@ options:
the user is removed from all groups except the primary group. the user is removed from all groups except the primary group.
- Before Ansible 2.3, the only input format allowed was a comma separated string. - Before Ansible 2.3, the only input format allowed was a comma separated string.
type: list type: list
elements: str
append: append:
description: description:
- If C(yes), add the user to the groups specified in C(groups). - If C(yes), add the user to the groups specified in C(groups).
@ -2873,7 +2874,7 @@ def main():
uid=dict(type='int'), uid=dict(type='int'),
non_unique=dict(type='bool', default=False), non_unique=dict(type='bool', default=False),
group=dict(type='str'), group=dict(type='str'),
groups=dict(type='list'), groups=dict(type='list', elements='str'),
comment=dict(type='str'), comment=dict(type='str'),
home=dict(type='path'), home=dict(type='path'),
shell=dict(type='str'), shell=dict(type='str'),

View file

@ -56,6 +56,7 @@ options:
description: description:
- The list of TCP connection states which are counted as active connections. - The list of TCP connection states which are counted as active connections.
type: list type: list
elements: str
default: [ ESTABLISHED, FIN_WAIT1, FIN_WAIT2, SYN_RECV, SYN_SENT, TIME_WAIT ] default: [ ESTABLISHED, FIN_WAIT1, FIN_WAIT2, SYN_RECV, SYN_SENT, TIME_WAIT ]
version_added: "2.3" version_added: "2.3"
state: state:
@ -83,6 +84,7 @@ options:
description: description:
- List of hosts or IPs to ignore when looking for active TCP connections for C(drained) state. - List of hosts or IPs to ignore when looking for active TCP connections for C(drained) state.
type: list type: list
elements: str
version_added: "1.8" version_added: "1.8"
sleep: sleep:
description: description:
@ -462,11 +464,11 @@ def main():
connect_timeout=dict(type='int', default=5), connect_timeout=dict(type='int', default=5),
delay=dict(type='int', default=0), delay=dict(type='int', default=0),
port=dict(type='int'), port=dict(type='int'),
active_connection_states=dict(type='list', default=['ESTABLISHED', 'FIN_WAIT1', 'FIN_WAIT2', 'SYN_RECV', 'SYN_SENT', 'TIME_WAIT']), active_connection_states=dict(type='list', elements='str', default=['ESTABLISHED', 'FIN_WAIT1', 'FIN_WAIT2', 'SYN_RECV', 'SYN_SENT', 'TIME_WAIT']),
path=dict(type='path'), path=dict(type='path'),
search_regex=dict(type='str'), search_regex=dict(type='str'),
state=dict(type='str', default='started', choices=['absent', 'drained', 'present', 'started', 'stopped']), state=dict(type='str', default='started', choices=['absent', 'drained', 'present', 'started', 'stopped']),
exclude_hosts=dict(type='list'), exclude_hosts=dict(type='list', elements='str'),
sleep=dict(type='int', default=1), sleep=dict(type='int', default=1),
msg=dict(type='str'), msg=dict(type='str'),
), ),

View file

@ -28,6 +28,7 @@ options:
- By default, this module will select the backend based on the C(ansible_pkg_mgr) fact. - By default, this module will select the backend based on the C(ansible_pkg_mgr) fact.
default: "auto" default: "auto"
choices: [ auto, yum, yum4, dnf ] choices: [ auto, yum, yum4, dnf ]
type: str
version_added: "2.7" version_added: "2.7"
name: name:
description: description:
@ -43,12 +44,15 @@ options:
exclude: exclude:
description: description:
- Package name(s) to exclude when state=present, or latest - Package name(s) to exclude when state=present, or latest
type: list
elements: str
version_added: "2.0" version_added: "2.0"
list: list:
description: description:
- "Package name to run the equivalent of yum list --show-duplicates <package> against. In addition to listing packages, - "Package name to run the equivalent of yum list --show-duplicates <package> against. In addition to listing packages,
use can also list the following: C(installed), C(updates), C(available) and C(repos)." use can also list the following: C(installed), C(updates), C(available) and C(repos)."
- This parameter is mutually exclusive with C(name). - This parameter is mutually exclusive with C(name).
type: str
state: state:
description: description:
- Whether to install (C(present) or C(installed), C(latest)), or remove (C(absent) or C(removed)) a package. - Whether to install (C(present) or C(installed), C(latest)), or remove (C(absent) or C(removed)) a package.
@ -57,6 +61,7 @@ options:
- C(absent) and C(removed) will remove the specified package. - C(absent) and C(removed) will remove the specified package.
- Default is C(None), however in effect the default action is C(present) unless the C(autoremove) option is - Default is C(None), however in effect the default action is C(present) unless the C(autoremove) option is
enabled for this module, then C(absent) is inferred. enabled for this module, then C(absent) is inferred.
type: str
choices: [ absent, installed, latest, present, removed ] choices: [ absent, installed, latest, present, removed ]
enablerepo: enablerepo:
description: description:
@ -65,6 +70,8 @@ options:
When specifying multiple repos, separate them with a C(","). When specifying multiple repos, separate them with a C(",").
- As of Ansible 2.7, this can alternatively be a list instead of C(",") - As of Ansible 2.7, this can alternatively be a list instead of C(",")
separated string separated string
type: list
elements: str
version_added: "0.9" version_added: "0.9"
disablerepo: disablerepo:
description: description:
@ -73,10 +80,13 @@ options:
When specifying multiple repos, separate them with a C(","). When specifying multiple repos, separate them with a C(",").
- As of Ansible 2.7, this can alternatively be a list instead of C(",") - As of Ansible 2.7, this can alternatively be a list instead of C(",")
separated string separated string
type: list
elements: str
version_added: "0.9" version_added: "0.9"
conf_file: conf_file:
description: description:
- The remote yum configuration file to use for the transaction. - The remote yum configuration file to use for the transaction.
type: str
version_added: "0.6" version_added: "0.6"
disable_gpg_check: disable_gpg_check:
description: description:
@ -121,6 +131,7 @@ options:
- Specifies an alternative installroot, relative to which all packages - Specifies an alternative installroot, relative to which all packages
will be installed. will be installed.
default: "/" default: "/"
type: str
version_added: "2.3" version_added: "2.3"
security: security:
description: description:
@ -132,6 +143,7 @@ options:
description: description:
- If set to C(yes), and C(state=latest) then only installs updates that have been marked bugfix related. - If set to C(yes), and C(state=latest) then only installs updates that have been marked bugfix related.
default: "no" default: "no"
type: bool
version_added: "2.6" version_added: "2.6"
allow_downgrade: allow_downgrade:
description: description:
@ -150,16 +162,21 @@ options:
description: description:
- I(Plugin) name to enable for the install/update operation. - I(Plugin) name to enable for the install/update operation.
The enabled plugin will not persist beyond the transaction. The enabled plugin will not persist beyond the transaction.
type: list
elements: str
version_added: "2.5" version_added: "2.5"
disable_plugin: disable_plugin:
description: description:
- I(Plugin) name to disable for the install/update operation. - I(Plugin) name to disable for the install/update operation.
The disabled plugins will not persist beyond the transaction. The disabled plugins will not persist beyond the transaction.
type: list
elements: str
version_added: "2.5" version_added: "2.5"
releasever: releasever:
description: description:
- Specifies an alternative release from which all packages will be - Specifies an alternative release from which all packages will be
installed. installed.
type: str
version_added: "2.7" version_added: "2.7"
autoremove: autoremove:
description: description:
@ -176,6 +193,7 @@ options:
- If set to C(all), disables all excludes. - If set to C(all), disables all excludes.
- If set to C(main), disable excludes defined in [main] in yum.conf. - If set to C(main), disable excludes defined in [main] in yum.conf.
- If set to C(repoid), disable excludes defined for given repo id. - If set to C(repoid), disable excludes defined for given repo id.
type: str
version_added: "2.7" version_added: "2.7"
download_only: download_only:
description: description:

View file

@ -34,6 +34,7 @@ options:
throttling will be disabled. If I(throttle) is expressed as a data rate throttling will be disabled. If I(throttle) is expressed as a data rate
(bytes/sec) then this option is ignored. Default is C(0) (no bandwidth (bytes/sec) then this option is ignored. Default is C(0) (no bandwidth
throttling). throttling).
type: str
default: 0 default: 0
baseurl: baseurl:
description: description:
@ -42,10 +43,13 @@ options:
- It can also be a list of multiple URLs. - It can also be a list of multiple URLs.
- This, the I(metalink) or I(mirrorlist) parameters are required if I(state) is set to - This, the I(metalink) or I(mirrorlist) parameters are required if I(state) is set to
C(present). C(present).
type: list
elements: str
cost: cost:
description: description:
- Relative cost of accessing this repository. Useful for weighing one - Relative cost of accessing this repository. Useful for weighing one
repo's packages as greater/less than any other. repo's packages as greater/less than any other.
type: str
default: 1000 default: 1000
deltarpm_metadata_percentage: deltarpm_metadata_percentage:
description: description:
@ -54,34 +58,39 @@ options:
can give values over C(100), so C(200) means that the metadata is can give values over C(100), so C(200) means that the metadata is
required to be half the size of the packages. Use C(0) to turn off required to be half the size of the packages. Use C(0) to turn off
this check, and always download metadata. this check, and always download metadata.
type: str
default: 100 default: 100
deltarpm_percentage: deltarpm_percentage:
description: description:
- When the relative size of delta vs pkg is larger than this, delta is - When the relative size of delta vs pkg is larger than this, delta is
not used. Use C(0) to turn off delta rpm processing. Local repositories not used. Use C(0) to turn off delta rpm processing. Local repositories
(with file:// I(baseurl)) have delta rpms turned off by default. (with file:// I(baseurl)) have delta rpms turned off by default.
type: str
default: 75 default: 75
description: description:
description: description:
- A human readable string describing the repository. This option corresponds to the "name" property in the repo file. - A human readable string describing the repository. This option corresponds to the "name" property in the repo file.
- This parameter is only required if I(state) is set to C(present). - This parameter is only required if I(state) is set to C(present).
type: str
enabled: enabled:
description: description:
- This tells yum whether or not use this repository. - This tells yum whether or not use this repository.
- Yum default value is C(true).
type: bool type: bool
default: 'yes'
enablegroups: enablegroups:
description: description:
- Determines whether yum will allow the use of package groups for this - Determines whether yum will allow the use of package groups for this
repository. repository.
- Yum default value is C(true).
type: bool type: bool
default: 'yes'
exclude: exclude:
description: description:
- List of packages to exclude from updates or installs. This should be a - List of packages to exclude from updates or installs. This should be a
space separated list. Shell globs using wildcards (eg. C(*) and C(?)) space separated list. Shell globs using wildcards (eg. C(*) and C(?))
are allowed. are allowed.
- The list can also be a regular YAML array. - The list can also be a regular YAML array.
type: list
elements: str
failovermethod: failovermethod:
choices: [roundrobin, priority] choices: [roundrobin, priority]
default: roundrobin default: roundrobin
@ -91,13 +100,16 @@ options:
contacting the host. contacting the host.
- C(priority) starts from the first I(baseurl) listed and reads through - C(priority) starts from the first I(baseurl) listed and reads through
them sequentially. them sequentially.
type: str
file: file:
description: description:
- File name without the C(.repo) extension to save the repo in. Defaults - File name without the C(.repo) extension to save the repo in. Defaults
to the value of I(name). to the value of I(name).
type: str
gpgcakey: gpgcakey:
description: description:
- A URL pointing to the ASCII-armored CA key file for the repository. - A URL pointing to the ASCII-armored CA key file for the repository.
type: str
gpgcheck: gpgcheck:
description: description:
- Tells yum whether or not it should perform a GPG signature check on - Tells yum whether or not it should perform a GPG signature check on
@ -109,6 +121,8 @@ options:
description: description:
- A URL pointing to the ASCII-armored GPG key file for the repository. - A URL pointing to the ASCII-armored GPG key file for the repository.
- It can also be a list of multiple URLs. - It can also be a list of multiple URLs.
type: list
elements: str
module_hotfixes: module_hotfixes:
description: description:
- Disable module RPM filtering and make all RPMs from the repository - Disable module RPM filtering and make all RPMs from the repository
@ -124,6 +138,7 @@ options:
not repository metadata downloads). not repository metadata downloads).
- C(none) means that no HTTP downloads should be cached. - C(none) means that no HTTP downloads should be cached.
choices: [all, packages, none] choices: [all, packages, none]
type: str
default: all default: all
include: include:
description: description:
@ -131,6 +146,7 @@ options:
supported. Configuration file will be inserted at the position of the supported. Configuration file will be inserted at the position of the
I(include=) line. Included files may contain further include lines. I(include=) line. Included files may contain further include lines.
Yum will abort with an error if an inclusion loop is detected. Yum will abort with an error if an inclusion loop is detected.
type: str
includepkgs: includepkgs:
description: description:
- List of packages you want to only use from a repository. This should be - List of packages you want to only use from a repository. This should be
@ -138,12 +154,15 @@ options:
are allowed. Substitution variables (e.g. C($releasever)) are honored are allowed. Substitution variables (e.g. C($releasever)) are honored
here. here.
- The list can also be a regular YAML array. - The list can also be a regular YAML array.
type: list
elements: str
ip_resolve: ip_resolve:
description: description:
- Determines how yum resolves host names. - Determines how yum resolves host names.
- C(4) or C(IPv4) - resolve to IPv4 addresses only. - C(4) or C(IPv4) - resolve to IPv4 addresses only.
- C(6) or C(IPv6) - resolve to IPv6 addresses only. - C(6) or C(IPv6) - resolve to IPv6 addresses only.
choices: [4, 6, IPv4, IPv6, whatever] choices: [4, 6, IPv4, IPv6, whatever]
type: str
default: whatever default: whatever
keepalive: keepalive:
description: description:
@ -157,11 +176,13 @@ options:
- Either C(1) or C(0). Determines whether or not yum keeps the cache of - Either C(1) or C(0). Determines whether or not yum keeps the cache of
headers and packages after successful installation. headers and packages after successful installation.
choices: ['0', '1'] choices: ['0', '1']
type: str
default: '1' default: '1'
metadata_expire: metadata_expire:
description: description:
- Time (in seconds) after which the metadata will expire. - Time (in seconds) after which the metadata will expire.
- Default value is 6 hours. - Default value is 6 hours.
type: str
default: 21600 default: 21600
metadata_expire_filter: metadata_expire_filter:
description: description:
@ -182,6 +203,7 @@ options:
I(yum check-update). I(yum check-update).
- Note that this option does not override "yum clean expire-cache". - Note that this option does not override "yum clean expire-cache".
choices: [never, 'read-only:past', 'read-only:present', 'read-only:future'] choices: [never, 'read-only:past', 'read-only:present', 'read-only:future']
type: str
default: 'read-only:present' default: 'read-only:present'
metalink: metalink:
description: description:
@ -190,31 +212,37 @@ options:
mirrors for the repomd.xml file to a I(baseurl). mirrors for the repomd.xml file to a I(baseurl).
- This, the I(baseurl) or I(mirrorlist) parameters are required if I(state) is set to - This, the I(baseurl) or I(mirrorlist) parameters are required if I(state) is set to
C(present). C(present).
type: str
mirrorlist: mirrorlist:
description: description:
- Specifies a URL to a file containing a list of baseurls. - Specifies a URL to a file containing a list of baseurls.
- This, the I(baseurl) or I(metalink) parameters are required if I(state) is set to - This, the I(baseurl) or I(metalink) parameters are required if I(state) is set to
C(present). C(present).
type: str
mirrorlist_expire: mirrorlist_expire:
description: description:
- Time (in seconds) after which the mirrorlist locally cached will - Time (in seconds) after which the mirrorlist locally cached will
expire. expire.
- Default value is 6 hours. - Default value is 6 hours.
type: str
default: 21600 default: 21600
name: name:
description: description:
- Unique repository ID. This option builds the section name of the repository in the repo file. - Unique repository ID. This option builds the section name of the repository in the repo file.
- This parameter is only required if I(state) is set to C(present) or - This parameter is only required if I(state) is set to C(present) or
C(absent). C(absent).
type: str
required: true required: true
password: password:
description: description:
- Password to use with the username for basic authentication. - Password to use with the username for basic authentication.
type: str
priority: priority:
description: description:
- Enforce ordered protection of repositories. The value is an integer - Enforce ordered protection of repositories. The value is an integer
from 1 to 99. from 1 to 99.
- This option only works if the YUM Priorities plugin is installed. - This option only works if the YUM Priorities plugin is installed.
type: str
default: 99 default: 99
protect: protect:
description: description:
@ -225,12 +253,15 @@ options:
description: description:
- URL to the proxy server that yum should use. Set to C(_none_) to - URL to the proxy server that yum should use. Set to C(_none_) to
disable the global proxy setting. disable the global proxy setting.
type: str
proxy_password: proxy_password:
description: description:
- Password for this proxy. - Password for this proxy.
type: str
proxy_username: proxy_username:
description: description:
- Username to use for proxy. - Username to use for proxy.
type: str
repo_gpgcheck: repo_gpgcheck:
description: description:
- This tells yum whether or not it should perform a GPG signature check - This tells yum whether or not it should perform a GPG signature check
@ -240,11 +271,13 @@ options:
reposdir: reposdir:
description: description:
- Directory where the C(.repo) files will be stored. - Directory where the C(.repo) files will be stored.
type: path
default: /etc/yum.repos.d default: /etc/yum.repos.d
retries: retries:
description: description:
- Set the number of times any attempt to retrieve a file should retry - Set the number of times any attempt to retrieve a file should retry
before returning an error. Setting this to C(0) makes yum try forever. before returning an error. Setting this to C(0) makes yum try forever.
type: str
default: 10 default: 10
s3_enabled: s3_enabled:
description: description:
@ -273,16 +306,19 @@ options:
description: description:
- Path to the directory containing the databases of the certificate - Path to the directory containing the databases of the certificate
authorities yum should use to verify SSL certificates. authorities yum should use to verify SSL certificates.
type: str
aliases: [ ca_cert ] aliases: [ ca_cert ]
sslclientcert: sslclientcert:
description: description:
- Path to the SSL client certificate yum should use to connect to - Path to the SSL client certificate yum should use to connect to
repos/remote sites. repos/remote sites.
type: str
aliases: [ client_cert ] aliases: [ client_cert ]
sslclientkey: sslclientkey:
description: description:
- Path to the SSL client key yum should use to connect to repos/remote - Path to the SSL client key yum should use to connect to repos/remote
sites. sites.
type: str
aliases: [ client_key ] aliases: [ client_key ]
sslverify: sslverify:
description: description:
@ -294,25 +330,30 @@ options:
description: description:
- State of the repo file. - State of the repo file.
choices: [absent, present] choices: [absent, present]
type: str
default: present default: present
throttle: throttle:
description: description:
- Enable bandwidth throttling for downloads. - Enable bandwidth throttling for downloads.
- This option can be expressed as a absolute data rate in bytes/sec. An - This option can be expressed as a absolute data rate in bytes/sec. An
SI prefix (k, M or G) may be appended to the bandwidth value. SI prefix (k, M or G) may be appended to the bandwidth value.
type: str
timeout: timeout:
description: description:
- Number of seconds to wait for a connection before timing out. - Number of seconds to wait for a connection before timing out.
type: str
default: 30 default: 30
ui_repoid_vars: ui_repoid_vars:
description: description:
- When a repository id is displayed, append these yum variables to the - When a repository id is displayed, append these yum variables to the
string if they are used in the I(baseurl)/etc. Variables are appended string if they are used in the I(baseurl)/etc. Variables are appended
in the order listed (and found). in the order listed (and found).
type: str
default: releasever basearch default: releasever basearch
username: username:
description: description:
- Username to use for basic authentication to a repo or really any url. - Username to use for basic authentication to a repo or really any url.
type: str
extends_documentation_fragment: extends_documentation_fragment:
- files - files
@ -548,23 +589,23 @@ def main():
# Module settings # Module settings
argument_spec = dict( argument_spec = dict(
bandwidth=dict(), bandwidth=dict(),
baseurl=dict(type='list'), baseurl=dict(type='list', elements='str'),
cost=dict(), cost=dict(),
deltarpm_metadata_percentage=dict(), deltarpm_metadata_percentage=dict(),
deltarpm_percentage=dict(), deltarpm_percentage=dict(),
description=dict(), description=dict(),
enabled=dict(type='bool'), enabled=dict(type='bool'),
enablegroups=dict(type='bool'), enablegroups=dict(type='bool'),
exclude=dict(type='list'), exclude=dict(type='list', elements='str'),
failovermethod=dict(choices=['roundrobin', 'priority']), failovermethod=dict(choices=['roundrobin', 'priority']),
file=dict(), file=dict(),
gpgcakey=dict(), gpgcakey=dict(),
gpgcheck=dict(type='bool'), gpgcheck=dict(type='bool'),
gpgkey=dict(type='list'), gpgkey=dict(type='list', elements='str'),
module_hotfixes=dict(type='bool'), module_hotfixes=dict(type='bool'),
http_caching=dict(choices=['all', 'packages', 'none']), http_caching=dict(choices=['all', 'packages', 'none']),
include=dict(), include=dict(),
includepkgs=dict(type='list'), includepkgs=dict(type='list', elements='str'),
ip_resolve=dict(choices=['4', '6', 'IPv4', 'IPv6', 'whatever']), ip_resolve=dict(choices=['4', '6', 'IPv4', 'IPv6', 'whatever']),
keepalive=dict(type='bool'), keepalive=dict(type='bool'),
keepcache=dict(choices=['0', '1']), keepcache=dict(choices=['0', '1']),
@ -603,7 +644,7 @@ def main():
username=dict(), username=dict(),
) )
argument_spec['async'] = dict(type='bool') argument_spec['async'] = dict(type='bool', default=True)
module = AnsibleModule( module = AnsibleModule(
argument_spec=argument_spec, argument_spec=argument_spec,

View file

@ -69,9 +69,7 @@ lib/ansible/module_utils/urls.py pylint:blacklisted-name
lib/ansible/module_utils/urls.py replace-urlopen lib/ansible/module_utils/urls.py replace-urlopen
lib/ansible/modules/command.py validate-modules:doc-missing-type lib/ansible/modules/command.py validate-modules:doc-missing-type
lib/ansible/modules/command.py validate-modules:nonexistent-parameter-documented lib/ansible/modules/command.py validate-modules:nonexistent-parameter-documented
lib/ansible/modules/command.py validate-modules:parameter-list-no-elements
lib/ansible/modules/command.py validate-modules:undocumented-parameter lib/ansible/modules/command.py validate-modules:undocumented-parameter
lib/ansible/modules/expect.py validate-modules:doc-missing-type
lib/ansible/modules/assemble.py validate-modules:nonexistent-parameter-documented lib/ansible/modules/assemble.py validate-modules:nonexistent-parameter-documented
lib/ansible/modules/blockinfile.py validate-modules:doc-choices-do-not-match-spec lib/ansible/modules/blockinfile.py validate-modules:doc-choices-do-not-match-spec
lib/ansible/modules/blockinfile.py validate-modules:doc-default-does-not-match-spec lib/ansible/modules/blockinfile.py validate-modules:doc-default-does-not-match-spec
@ -91,80 +89,43 @@ lib/ansible/modules/stat.py validate-modules:parameter-invalid
lib/ansible/modules/stat.py validate-modules:parameter-type-not-in-doc lib/ansible/modules/stat.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/stat.py validate-modules:undocumented-parameter lib/ansible/modules/stat.py validate-modules:undocumented-parameter
lib/ansible/modules/unarchive.py validate-modules:nonexistent-parameter-documented lib/ansible/modules/unarchive.py validate-modules:nonexistent-parameter-documented
lib/ansible/modules/unarchive.py validate-modules:parameter-list-no-elements
lib/ansible/modules/get_url.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/uri.py pylint:blacklisted-name lib/ansible/modules/uri.py pylint:blacklisted-name
lib/ansible/modules/uri.py validate-modules:doc-required-mismatch lib/ansible/modules/uri.py validate-modules:doc-required-mismatch
lib/ansible/modules/uri.py validate-modules:parameter-list-no-elements
lib/ansible/modules/uri.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/pip.py pylint:blacklisted-name lib/ansible/modules/pip.py pylint:blacklisted-name
lib/ansible/modules/pip.py validate-modules:doc-elements-mismatch
lib/ansible/modules/pip.py validate-modules:invalid-ansiblemodule-schema lib/ansible/modules/pip.py validate-modules:invalid-ansiblemodule-schema
lib/ansible/modules/apt.py validate-modules:doc-default-does-not-match-spec
lib/ansible/modules/apt.py validate-modules:parameter-invalid lib/ansible/modules/apt.py validate-modules:parameter-invalid
lib/ansible/modules/apt.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/apt.py validate-modules:undocumented-parameter
lib/ansible/modules/apt_key.py validate-modules:parameter-type-not-in-doc lib/ansible/modules/apt_key.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/apt_key.py validate-modules:undocumented-parameter
lib/ansible/modules/apt_repository.py validate-modules:doc-default-does-not-match-spec lib/ansible/modules/apt_repository.py validate-modules:doc-default-does-not-match-spec
lib/ansible/modules/apt_repository.py validate-modules:parameter-invalid lib/ansible/modules/apt_repository.py validate-modules:parameter-invalid
lib/ansible/modules/apt_repository.py validate-modules:parameter-type-not-in-doc lib/ansible/modules/apt_repository.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/apt_repository.py validate-modules:undocumented-parameter lib/ansible/modules/apt_repository.py validate-modules:undocumented-parameter
lib/ansible/modules/dnf.py validate-modules:doc-missing-type
lib/ansible/modules/dnf.py validate-modules:doc-required-mismatch lib/ansible/modules/dnf.py validate-modules:doc-required-mismatch
lib/ansible/modules/dnf.py validate-modules:parameter-invalid lib/ansible/modules/dnf.py validate-modules:parameter-invalid
lib/ansible/modules/dnf.py validate-modules:parameter-list-no-elements
lib/ansible/modules/dnf.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/dpkg_selections.py validate-modules:doc-missing-type
lib/ansible/modules/dpkg_selections.py validate-modules:doc-required-mismatch
lib/ansible/modules/package_facts.py validate-modules:doc-choices-do-not-match-spec lib/ansible/modules/package_facts.py validate-modules:doc-choices-do-not-match-spec
lib/ansible/modules/package_facts.py validate-modules:doc-missing-type
lib/ansible/modules/package_facts.py validate-modules:parameter-list-no-elements
lib/ansible/modules/rpm_key.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/yum.py pylint:blacklisted-name lib/ansible/modules/yum.py pylint:blacklisted-name
lib/ansible/modules/yum.py validate-modules:doc-missing-type
lib/ansible/modules/yum.py validate-modules:parameter-invalid lib/ansible/modules/yum.py validate-modules:parameter-invalid
lib/ansible/modules/yum.py validate-modules:parameter-list-no-elements
lib/ansible/modules/yum.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/yum_repository.py validate-modules:doc-default-does-not-match-spec lib/ansible/modules/yum_repository.py validate-modules:doc-default-does-not-match-spec
lib/ansible/modules/yum_repository.py validate-modules:doc-missing-type
lib/ansible/modules/yum_repository.py validate-modules:parameter-list-no-elements
lib/ansible/modules/yum_repository.py validate-modules:parameter-type-not-in-doc lib/ansible/modules/yum_repository.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/yum_repository.py validate-modules:undocumented-parameter lib/ansible/modules/yum_repository.py validate-modules:undocumented-parameter
lib/ansible/modules/git.py pylint:blacklisted-name lib/ansible/modules/git.py pylint:blacklisted-name
lib/ansible/modules/git.py use-argspec-type-path lib/ansible/modules/git.py use-argspec-type-path
lib/ansible/modules/git.py validate-modules:doc-missing-type lib/ansible/modules/git.py validate-modules:doc-missing-type
lib/ansible/modules/git.py validate-modules:doc-required-mismatch lib/ansible/modules/git.py validate-modules:doc-required-mismatch
lib/ansible/modules/git.py validate-modules:parameter-list-no-elements
lib/ansible/modules/git.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/subversion.py validate-modules:doc-required-mismatch
lib/ansible/modules/subversion.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/subversion.py validate-modules:undocumented-parameter
lib/ansible/modules/getent.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/hostname.py validate-modules:invalid-ansiblemodule-schema lib/ansible/modules/hostname.py validate-modules:invalid-ansiblemodule-schema
lib/ansible/modules/hostname.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/iptables.py pylint:blacklisted-name lib/ansible/modules/iptables.py pylint:blacklisted-name
lib/ansible/modules/iptables.py validate-modules:parameter-list-no-elements
lib/ansible/modules/service.py validate-modules:nonexistent-parameter-documented lib/ansible/modules/service.py validate-modules:nonexistent-parameter-documented
lib/ansible/modules/service.py validate-modules:use-run-command-not-popen lib/ansible/modules/service.py validate-modules:use-run-command-not-popen
lib/ansible/modules/setup.py validate-modules:parameter-list-no-elements
lib/ansible/modules/setup.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/systemd.py validate-modules:parameter-invalid lib/ansible/modules/systemd.py validate-modules:parameter-invalid
lib/ansible/modules/systemd.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/systemd.py validate-modules:return-syntax-error lib/ansible/modules/systemd.py validate-modules:return-syntax-error
lib/ansible/modules/sysvinit.py validate-modules:parameter-list-no-elements
lib/ansible/modules/sysvinit.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/sysvinit.py validate-modules:return-syntax-error lib/ansible/modules/sysvinit.py validate-modules:return-syntax-error
lib/ansible/modules/user.py validate-modules:doc-default-does-not-match-spec lib/ansible/modules/user.py validate-modules:doc-default-does-not-match-spec
lib/ansible/modules/user.py validate-modules:doc-default-incompatible-type lib/ansible/modules/user.py validate-modules:doc-default-incompatible-type
lib/ansible/modules/user.py validate-modules:parameter-list-no-elements
lib/ansible/modules/user.py validate-modules:use-run-command-not-popen lib/ansible/modules/user.py validate-modules:use-run-command-not-popen
lib/ansible/modules/async_status.py use-argspec-type-path lib/ansible/modules/async_status.py use-argspec-type-path
lib/ansible/modules/async_status.py validate-modules!skip lib/ansible/modules/async_status.py validate-modules!skip
lib/ansible/modules/async_wrapper.py ansible-doc!skip # not an actual module lib/ansible/modules/async_wrapper.py ansible-doc!skip # not an actual module
lib/ansible/modules/async_wrapper.py pylint:ansible-bad-function # ignore, required lib/ansible/modules/async_wrapper.py pylint:ansible-bad-function # ignore, required
lib/ansible/modules/async_wrapper.py use-argspec-type-path lib/ansible/modules/async_wrapper.py use-argspec-type-path
lib/ansible/modules/wait_for.py validate-modules:parameter-list-no-elements
lib/ansible/parsing/vault/__init__.py pylint:blacklisted-name lib/ansible/parsing/vault/__init__.py pylint:blacklisted-name
lib/ansible/playbook/base.py pylint:blacklisted-name lib/ansible/playbook/base.py pylint:blacklisted-name
lib/ansible/playbook/collectionsearch.py required-and-default-attributes # https://github.com/ansible/ansible/issues/61460 lib/ansible/playbook/collectionsearch.py required-and-default-attributes # https://github.com/ansible/ansible/issues/61460