mirror of
https://github.com/ansible/awx.git
synced 2024-10-30 22:21:13 +03:00
Include all cleanup tasks when the cleanup management job is run
This commit is contained in:
parent
f422d86355
commit
b2e1f04ecf
@ -1114,12 +1114,14 @@ class RunSystemJob(BaseTask):
|
||||
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'])
|
||||
args.extend(['--jobs', '--project-updates', '--inventory-updates'])
|
||||
# Keeping this around in case we want to break this out
|
||||
# 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:
|
||||
logger.error("Failed to parse system job: " + str(e))
|
||||
return args
|
||||
|
Loading…
Reference in New Issue
Block a user