Browse code

Merge pull request #2531 from Afterburn/devel

Suppressed output and updated documentation

Michael DeHaan authored on 2013/03/31 23:42:58
Showing 1 changed files
... ...
@@ -30,17 +30,17 @@ version_added: "1.0"
30 30
 options:
31 31
     name:
32 32
         description:
33
-            - name of package to install/remove
33
+            - name of package to install, upgrade or remove.
34 34
         required: true
35 35
 
36 36
     state:
37 37
         description:
38
-            - state of the package installed or absent. 
38
+            - state of the package (installed or absent).
39 39
         required: false
40 40
 
41 41
     update_cache:
42 42
         description:
43
-            - update the package db first (pacman -Syy)
43
+            - update the package database first (pacman -Syy).
44 44
         required: false
45 45
         default: "no"
46 46
         choices: [ "yes", "no" ]
... ...
@@ -55,7 +55,7 @@ examples:
55 55
     - code: "pacman: name=foo,bar state=absent"
56 56
       description: remove packages foo and bar 
57 57
     - code: "pacman: name=bar, state=installed, update_cache=yes"
58
-      description: update the package db (pacman -Syy) then install bar (bar will be the updated if a newer version exists) 
58
+      description: update the package database (pacman -Syy) and install bar (bar will be the updated if a newer version exists) 
59 59
       
60 60
 '''
61 61
 
... ...
@@ -81,7 +81,7 @@ def query_package(module, name, state="installed"):
81 81
 
82 82
 
83 83
 def update_package_db(module):
84
-    rc = os.system("pacman -Syy")
84
+    rc = os.system("pacman -Syy > /dev/null")
85 85
 
86 86
     if rc != 0:
87 87
         module.fail_json(msg="could not update package db")
... ...
@@ -96,7 +96,7 @@ def remove_packages(module, packages):
96 96
         if not query_package(module, package):
97 97
             continue
98 98
 
99
-        rc = os.system("pacman -R %s --noconfirm" % (package))
99
+        rc = os.system("pacman -R %s --noconfirm > /dev/null" % (package))
100 100
 
101 101
         if rc != 0:
102 102
             module.fail_json(msg="failed to remove %s" % (package))
... ...
@@ -118,7 +118,7 @@ def install_packages(module, packages):
118 118
         if query_package(module, package):
119 119
             continue
120 120
 
121
-        rc = os.system("pacman -S %s --noconfirm" % (package))
121
+        rc = os.system("pacman -S %s --noconfirm > /dev/null" % (package))
122 122
 
123 123
         if rc != 0:
124 124
             module.fail_json(msg="failed to install %s" % (package))