Add job artifacts and workflow artifact passing

artifacts redact from job when no_log is set
parent no_log artifacts treated as survey passwords
This commit is contained in:
AlanCoding
2016-09-15 15:48:18 -04:00
parent 7bd19b8e98
commit 5d4cf9d4fc
11 changed files with 243 additions and 18 deletions

View File

@@ -821,6 +821,11 @@ class RunJob(BaseTask):
env['ANSIBLE_CACHE_PLUGINS'] = self.get_path_to('..', 'plugins', 'fact_caching')
env['ANSIBLE_CACHE_PLUGIN'] = "tower"
env['ANSIBLE_CACHE_PLUGIN_CONNECTION'] = "tcp://127.0.0.1:%s" % str(settings.FACT_CACHE_PORT)
# Set artifact module path
# TODO: restrict this to workflow jobs, or JTs expecting artifacts
env['ANSIBLE_LIBRARY'] = self.get_path_to('..', 'plugins', 'library')
return env
def build_args(self, job, **kwargs):
@@ -893,7 +898,7 @@ class RunJob(BaseTask):
'tower_user_name': job.created_by.username,
})
if job.extra_vars_dict:
if kwargs.get('display', False) and job.job_template and job.job_template.survey_enabled:
if kwargs.get('display', False) and job.job_template:
extra_vars.update(json.loads(job.display_extra_vars()))
else:
extra_vars.update(job.extra_vars_dict)