Browse Source

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
changes/36/601036/2
Clint Byrum 3 years ago
parent
commit
bde27fa4ec
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      zuul/executor/server.py

+ 2
- 0
zuul/executor/server.py View File

@ -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…
Cancel
Save