mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
Add more customization with data passed to the system job when run
This commit is contained in:
parent
08fc24c9e5
commit
1fae7e6764
@ -1145,6 +1145,13 @@ class RunSystemJob(BaseTask):
|
||||
json_vars = json.loads(system_job.extra_vars)
|
||||
if 'days' in json_vars:
|
||||
args.extend(['--days', str(json_vars['days'])])
|
||||
if system_job.job_type == 'cleanup_jobs':
|
||||
if 'jobs' in json_vars and json_vars['jobs']:
|
||||
args.extend(['--jobs'])
|
||||
if 'project_updates' in json_vars and json_vars['project_updates']:
|
||||
args.extend(['--project-updates'])
|
||||
if 'inventory_updates' in json_vars and json_vars['inventory_updates']:
|
||||
args.extend(['--inventory-updates'])
|
||||
except Exception, e:
|
||||
pass
|
||||
print args
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user