1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-07-01 16:18:55 +00:00

Merge remote branch 'public/integration'

This commit is contained in:
Michael DeHaan 2012-04-02 20:02:46 -04:00
commit e5d5b072db
5 changed files with 92 additions and 57 deletions

View file

@ -1,4 +1,3 @@
#!/usr/bin/python -tt
# (C) 2012, Michael DeHaan, <michael.dehaan@gmail.com>
# This file is part of Ansible

View file

@ -457,7 +457,7 @@ class PlayBook(object):
SETUP_CACHE[host] = result
if self.extra_vars:
extra_vars = utils.parse_kv(shlex.split(self.extra_vars))
extra_vars = utils.parse_kv(self.extra_vars)
for h in self.host_list:
try:
SETUP_CACHE[h].update(extra_vars)

View file

@ -160,6 +160,9 @@ class Runner(object):
cmd.extend(['--extra-vars', extra_vars])
cmd = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=False)
out, err = cmd.communicate()
rc = cmd.returncode
if rc:
raise errors.AnsibleError("%s: %s" % (host_list, err))
try:
groups = utils.json_loads(out)
except: