yum: doc fixes (#30897)

This PR includes:
- Documentation fixes
pull/31033/head
Dag Wieers 7 years ago committed by Jordan Borean
parent 0ef87c849f
commit 4832b9a2d2

@ -1,21 +1,19 @@
#!/usr/bin/python -tt #!/usr/bin/python -tt
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# (c) 2012, Red Hat, Inc # Copyright: (c) 2012, Red Hat, Inc
# Written by Seth Vidal <skvidal at fedoraproject.org> # Written by Seth Vidal <skvidal at fedoraproject.org>
# (c) 2014, Epic Games, Inc. # Copyright: (c) 2014, Epic Games, Inc.
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
__metaclass__ = type __metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1', ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterface'], 'status': ['stableinterface'],
'supported_by': 'core'} 'supported_by': 'core'}
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: yum module: yum
@ -35,110 +33,78 @@ options:
several packages this can accept a comma separated list of packages several packages this can accept a comma separated list of packages
or (as of 2.0) a list of packages. or (as of 2.0) a list of packages.
required: true required: true
default: null aliases: [ pkg ]
aliases: [ 'pkg' ]
exclude: exclude:
description: description:
- "Package name(s) to exclude when state=present, or latest" - "Package name(s) to exclude when state=present, or latest"
required: false
version_added: "2.0" version_added: "2.0"
default: null
list: list:
description: description:
- "Package name to run the equivalent of yum list <package> against. In addition to listing packages, - "Package name to run the equivalent of yum list <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)."
required: false
default: null
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.
required: false choices: [ absent, installed, latest, present, removed ]
choices: [ "present", "installed", "latest", "absent", "removed" ] default: present
default: "present"
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 ",".
required: false
version_added: "0.9" version_added: "0.9"
default: null
aliases: []
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 ",".
required: false
version_added: "0.9" version_added: "0.9"
default: null
aliases: []
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.
required: false
version_added: "0.6" version_added: "0.6"
default: null
aliases: []
disable_gpg_check: disable_gpg_check:
description: description:
- Whether to disable the GPG checking of signatures of packages being - Whether to disable the GPG checking of signatures of packages being
installed. Has an effect only if state is I(present) or I(latest). installed. Has an effect only if state is I(present) or I(latest).
required: false type: bool
version_added: "1.2"
default: "no" default: "no"
choices: ["yes", "no"] version_added: "1.2"
aliases: []
skip_broken: skip_broken:
description: description:
- Resolve depsolve problems by removing packages that are causing problems from the trans - Resolve depsolve problems by removing packages that are causing problems from the trans
action. action.
required: false type: bool
version_added: "2.3"
default: "no" default: "no"
choices: ["yes", "no"] version_added: "2.3"
aliases: []
update_cache: update_cache:
description: description:
- Force yum to check if cache is out of date and redownload if needed. - Force yum to check if cache is out of date and redownload if needed.
Has an effect only if state is I(present) or I(latest). Has an effect only if state is I(present) or I(latest).
required: false type: bool
version_added: "1.9"
default: "no" default: "no"
choices: ["yes", "no"] aliases: [ expire-cache ]
aliases: [ "expire-cache" ] version_added: "1.9"
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.
- This should only set to C(no) used on personally controlled sites using self-signed certificates as it avoids verifying the source site. - This should only set to C(no) used on personally controlled sites using self-signed certificates as it avoids verifying the source site.
- Prior to 2.1 the code worked as if this was set to C(yes). - Prior to 2.1 the code worked as if this was set to C(yes).
required: false type: bool
default: "yes" default: "yes"
choices: ["yes", "no"]
version_added: "2.1" version_added: "2.1"
installroot: installroot:
description: description:
- Specifies an alternative installroot, relative to which all packages - Specifies an alternative installroot, relative to which all packages
will be installed. will be installed.
required: false
version_added: "2.3"
default: "/" default: "/"
aliases: [] version_added: "2.3"
security: security:
description: description:
- If set to C(yes), and C(state=latest) then only installs updates that have been marked security related. - If set to C(yes), and C(state=latest) then only installs updates that have been marked security related.
type: bool
default: "no" default: "no"
choices: ["yes", "no"]
version_added: "2.4" version_added: "2.4"
allow_downgrade: allow_downgrade:
description: description:
- Specify if the named package and version is allowed to downgrade - Specify if the named package and version is allowed to downgrade
@ -149,11 +115,9 @@ options:
packages to install (because dependencies between the downgraded packages to install (because dependencies between the downgraded
package and others can cause changes to the packages which were package and others can cause changes to the packages which were
in the earlier transaction). in the earlier transaction).
required: false type: bool
default: "no" default: "no"
choices: ["yes", "no"]
version_added: "2.4" version_added: "2.4"
notes: notes:
- When used with a loop of package names in a playbook, ansible optimizes - When used with a loop of package names in a playbook, ansible optimizes
the call to the yum module. Instead of calling the module with a single the call to the yum module. Instead of calling the module with a single
@ -177,13 +141,14 @@ notes:
Use the "yum group list" command to see which category of group the group Use the "yum group list" command to see which category of group the group
you want to install falls into.' you want to install falls into.'
# informational: requirements for nodes # informational: requirements for nodes
requirements: [ yum ] requirements:
- yum
author: author:
- "Ansible Core Team" - Ansible Core Team
- "Seth Vidal" - Seth Vidal
- "Eduard Snesarev (github.com/verm666)" - Eduard Snesarev (github.com/verm666)
- "Berend De Schouwer (github.com/berenddeschouwer)" - Berend De Schouwer (github.com/berenddeschouwer)
- "Abhijeet Kasurde (github.com/akasurde)" - Abhijeet Kasurde (github.com/akasurde)
''' '''
EXAMPLES = ''' EXAMPLES = '''
@ -1252,27 +1217,27 @@ def main():
module = AnsibleModule( module = AnsibleModule(
argument_spec=dict( argument_spec=dict(
name=dict(aliases=['pkg'], type="list"), name=dict(type='list', aliases=['pkg']),
exclude=dict(required=False, default=None), exclude=dict(type='str'),
# removed==absent, installed==present, these are accepted as aliases # removed==absent, installed==present, these are accepted as aliases
state=dict(default='installed', choices=['absent', 'present', 'installed', 'removed', 'latest']), state=dict(type='str', default='installed', choices=['absent', 'installed', 'latest', 'present', 'removed']),
enablerepo=dict(), enablerepo=dict(type='str'),
disablerepo=dict(), disablerepo=dict(type='str'),
list=dict(), list=dict(type='str'),
conf_file=dict(default=None), conf_file=dict(type='str'),
disable_gpg_check=dict(required=False, default="no", type='bool'), disable_gpg_check=dict(type='bool', default=False),
skip_broken=dict(required=False, default="no", aliases=[], type='bool'), skip_broken=dict(type='bool', default=False),
update_cache=dict(required=False, default="no", aliases=['expire-cache'], type='bool'), update_cache=dict(type='bool', default=False, aliases=['expire-cache']),
validate_certs=dict(required=False, default="yes", type='bool'), validate_certs=dict(type='bool', default=True),
installroot=dict(required=False, default="/", type='str'), installroot=dict(type='str', default="/"),
# this should not be needed, but exists as a failsafe # this should not be needed, but exists as a failsafe
install_repoquery=dict(required=False, default="yes", type='bool'), install_repoquery=dict(type='bool', default=True),
allow_downgrade=dict(required=False, default="no", type='bool'), allow_downgrade=dict(type='bool', default=False),
security=dict(default="no", type='bool'), security=dict(type='bool', default=False),
), ),
required_one_of=[['name', 'list']], required_one_of=[['name', 'list']],
mutually_exclusive=[['name', 'list']], mutually_exclusive=[['name', 'list']],
supports_check_mode=True supports_check_mode=True,
) )
error_msgs = [] error_msgs = []

Loading…
Cancel
Save