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

@@ -223,10 +223,7 @@ class User(object):
syslog.openlog('ansible-%s' % os.path.basename(__file__))
syslog.syslog(syslog.LOG_NOTICE, 'Command %s' % '|'.join(cmd))
p = subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(out, err) = p.communicate()
rc = p.returncode
return (rc, out, err)
return self.module.run_command(cmd)
def remove_user_userdel(self):
cmd = [self.module.get_bin_path('userdel', True)]