|
|
@ -279,12 +279,12 @@ class Inventory(object):
|
|
|
|
vars.update(updated)
|
|
|
|
vars.update(updated)
|
|
|
|
|
|
|
|
|
|
|
|
if self._is_script:
|
|
|
|
if self._is_script:
|
|
|
|
cmd = subprocess.Popen(
|
|
|
|
cmd = [self.host_list,"--host",hostname]
|
|
|
|
[self.host_list,"--host",hostname],
|
|
|
|
try:
|
|
|
|
stdout=subprocess.PIPE,
|
|
|
|
sp = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
|
|
|
stderr=subprocess.PIPE
|
|
|
|
except OSError, e:
|
|
|
|
)
|
|
|
|
raise errors.AnsibleError("problem running %s (%s)" % (' '.join(cmd), e))
|
|
|
|
(out, err) = cmd.communicate()
|
|
|
|
(out, err) = sp.communicate()
|
|
|
|
results = utils.parse_json(out)
|
|
|
|
results = utils.parse_json(out)
|
|
|
|
|
|
|
|
|
|
|
|
# FIXME: this is a bit redundant with host.py and should share code
|
|
|
|
# FIXME: this is a bit redundant with host.py and should share code
|
|
|
|