Include executor variables in initial setup call
We call setup before we run playbooks to gather some information on nodes. But sometimes variables might be needed for the setup module to complete (such as the case where you want to use images without /usr/bin/python and thus want to set ansible_python_interpreter to something else). Change-Id: I11fb912a86cedc67848f745f0afe16619a1d1e47
This commit is contained in:
parent
60cabbd368
commit
bde27fa4ec
|
@ -1830,6 +1830,8 @@ class AnsibleJob(object):
|
|||
cmd = ['ansible', '*', verbose, '-m', 'setup',
|
||||
'-i', self.jobdir.setup_inventory,
|
||||
'-a', 'gather_subset=!all']
|
||||
if self.executor_variables_file is not None:
|
||||
cmd.extend(['-e@%s' % self.executor_variables_file])
|
||||
|
||||
result, code = self.runAnsible(
|
||||
cmd=cmd, timeout=60, playbook=playbook,
|
||||
|
|
Loading…
Reference in New Issue