diff options
author | Michael DeHaan <michael.dehaan@gmail.com> | 2013-03-31 07:42:58 -0700 |
---|---|---|
committer | Michael DeHaan <michael.dehaan@gmail.com> | 2013-03-31 07:42:58 -0700 |
commit | a325741ab0545ecd7d1cd50665beb17b821d169f (patch) | |
tree | 4cd4b1b4e55c1244bef94229dfb2060a8555a7ba | |
parent | 4b2a26c4c9079f4baac11bf3d13fc34fb1a9b6f0 (diff) | |
parent | 6d5852529bfd728f7d4774ef27974ca56ec26a8e (diff) | |
download | ansible-a325741ab0545ecd7d1cd50665beb17b821d169f.tar.gz |
Merge pull request #2531 from Afterburn/devel
Suppressed output and updated documentation
-rwxr-xr-x | library/pacman | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/library/pacman b/library/pacman index 534300d762..fdfb2113c6 100755 --- a/library/pacman +++ b/library/pacman @@ -30,17 +30,17 @@ version_added: "1.0" options: name: description: - - name of package to install/remove + - name of package to install, upgrade or remove. required: true state: description: - - state of the package installed or absent. + - state of the package (installed or absent). required: false update_cache: description: - - update the package db first (pacman -Syy) + - update the package database first (pacman -Syy). required: false default: "no" choices: [ "yes", "no" ] @@ -55,7 +55,7 @@ examples: - code: "pacman: name=foo,bar state=absent" description: remove packages foo and bar - code: "pacman: name=bar, state=installed, update_cache=yes" - description: update the package db (pacman -Syy) then install bar (bar will be the updated if a newer version exists) + description: update the package database (pacman -Syy) and install bar (bar will be the updated if a newer version exists) ''' @@ -81,7 +81,7 @@ def query_package(module, name, state="installed"): def update_package_db(module): - rc = os.system("pacman -Syy") + rc = os.system("pacman -Syy > /dev/null") if rc != 0: module.fail_json(msg="could not update package db") @@ -96,7 +96,7 @@ def remove_packages(module, packages): if not query_package(module, package): continue - rc = os.system("pacman -R %s --noconfirm" % (package)) + rc = os.system("pacman -R %s --noconfirm > /dev/null" % (package)) if rc != 0: module.fail_json(msg="failed to remove %s" % (package)) @@ -118,7 +118,7 @@ def install_packages(module, packages): if query_package(module, package): continue - rc = os.system("pacman -S %s --noconfirm" % (package)) + rc = os.system("pacman -S %s --noconfirm > /dev/null" % (package)) if rc != 0: module.fail_json(msg="failed to install %s" % (package)) |