Update modules to use run_command in module_common.py

This updates apt, apt_repository, command, cron, easy_install, facter,
fireball, git, group, mount, ohai, pip, service, setup, subversion,
supervisorctl, svr4pkg, user, and yum to take advantage of run_command
in module_common.py.
This commit is contained in:
Stephen Fromm
2013-01-11 22:10:21 -08:00
parent 300531507b
commit 3fb21a5281
19 changed files with 111 additions and 275 deletions

View File

@@ -85,11 +85,7 @@ class Subversion(object):
if self.password:
bits.append("--password '%s'" % self.password)
bits.append(args)
cmd = subprocess.Popen(' '.join(bits), shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = cmd.communicate()
rc = cmd.returncode
if rc != 0:
self.module.fail_json(msg=err)
rc, out, err = self.module.run_command(' '.join(bits), fail_on_rc_non_zero=True)
return out.splitlines()
def checkout(self):