Fixes from refactoring
This commit is contained in:
parent
6a7aac38c5
commit
94605b811b
1 changed files with 7 additions and 5 deletions
|
@ -276,6 +276,7 @@ class Runner(object):
|
||||||
if str(v).find(" ") != -1:
|
if str(v).find(" ") != -1:
|
||||||
v = "\"%s\"" % v
|
v = "\"%s\"" % v
|
||||||
args += " %s=%s" % (k, str(v).replace(" ","~~~"))
|
args += " %s=%s" % (k, str(v).replace(" ","~~~"))
|
||||||
|
return args
|
||||||
|
|
||||||
# *****************************************************
|
# *****************************************************
|
||||||
|
|
||||||
|
@ -287,6 +288,7 @@ class Runner(object):
|
||||||
args = "%s metadata=/etc/ansible/setup" % args
|
args = "%s metadata=/etc/ansible/setup" % args
|
||||||
else:
|
else:
|
||||||
args = "%s metadata=~/.ansible/setup" % args
|
args = "%s metadata=~/.ansible/setup" % args
|
||||||
|
return args
|
||||||
|
|
||||||
# *****************************************************
|
# *****************************************************
|
||||||
|
|
||||||
|
@ -316,8 +318,8 @@ class Runner(object):
|
||||||
if Runner._external_variable_script is not None:
|
if Runner._external_variable_script is not None:
|
||||||
self._add_variables_from_script(conn, inject)
|
self._add_variables_from_script(conn, inject)
|
||||||
if self.module_name == 'setup':
|
if self.module_name == 'setup':
|
||||||
self._add_setup_vars(inject, args)
|
args = self._add_setup_vars(inject, args)
|
||||||
self._add_setup_metadata(args)
|
args = self._add_setup_metadata(args)
|
||||||
|
|
||||||
args = utils.template(args, inject)
|
args = utils.template(args, inject)
|
||||||
module_name_tail = remote_module_path.split("/")[-1]
|
module_name_tail = remote_module_path.split("/")[-1]
|
||||||
|
@ -602,7 +604,7 @@ class Runner(object):
|
||||||
|
|
||||||
hosts = [ (self,x) for x in hosts ]
|
hosts = [ (self,x) for x in hosts ]
|
||||||
if self.forks > 1:
|
if self.forks > 1:
|
||||||
results = self._parallel_exec(hosts, results)
|
results = self._parallel_exec(hosts)
|
||||||
else:
|
else:
|
||||||
results = [ x._executor(h) for (x,h) in hosts ]
|
results = [ x._executor(h) for (x,h) in hosts ]
|
||||||
return self._partition_results(results)
|
return self._partition_results(results)
|
||||||
|
|
Loading…
Reference in a new issue