mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user