Merge remote branch 'public/integration'

This commit is contained in:
Michael DeHaan
2012-04-02 20:02:46 -04:00
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: