Rename option to 'recurse' to make it consistent. Add version_added to docs.

reviewable/pr18780/r1
Michael DeHaan 11 years ago
parent 933455a6a3
commit c13b1cb18e

@ -45,13 +45,14 @@ options:
default: "no" default: "no"
choices: [ "yes", "no" ] choices: [ "yes", "no" ]
recursive: recurse:
description: description:
- remove all not explicitly installed dependencies not required - remove all not explicitly installed dependencies not required
by other packages of the package to remove by other packages of the package to remove
required: false required: false
default: "no" default: "no"
choices: [ "yes", "no" ] choices: [ "yes", "no" ]
version_added: "1.3"
author: Afterburn author: Afterburn
notes: [] notes: []
@ -68,7 +69,7 @@ EXAMPLES = '''
- pacman: name=foo,bar state=absent - pacman: name=foo,bar state=absent
# Recursively remove package baz # Recursively remove package baz
- pacman: name=baz state=absent recursive=yes - pacman: name=baz state=absent recurse=yes
# Update the package database (pacman -Syy) and install bar (bar will be the updated if a newer version exists) # Update the package database (pacman -Syy) and install bar (bar will be the updated if a newer version exists)
- pacman: name=bar, state=installed, update_cache=yes - pacman: name=bar, state=installed, update_cache=yes
@ -103,7 +104,7 @@ def update_package_db(module):
def remove_packages(module, packages): def remove_packages(module, packages):
if module.params["recursive"]: if module.params["recurse"]:
args = "Rs" args = "Rs"
else: else:
args = "R" args = "R"
@ -156,7 +157,7 @@ def main():
argument_spec = dict( argument_spec = dict(
state = dict(default="installed", choices=["installed","absent"]), state = dict(default="installed", choices=["installed","absent"]),
update_cache = dict(default="no", aliases=["update-cache"], type='bool'), update_cache = dict(default="no", aliases=["update-cache"], type='bool'),
recursive = dict(default="no", type='bool'), recurse = dict(default="no", type='bool'),
name = dict(aliases=["pkg"], required=True))) name = dict(aliases=["pkg"], required=True)))

Loading…
Cancel
Save