surface dry_run option for system jobs through the API

This commit is contained in:
AlanCoding
2017-02-07 10:37:41 -05:00
parent 5a1b56af42
commit 93034ef1d6
2 changed files with 8 additions and 2 deletions

View File

@@ -1914,6 +1914,8 @@ class RunSystemJob(BaseTask):
json_vars = json.loads(system_job.extra_vars)
if 'days' in json_vars and system_job.job_type != 'cleanup_facts':
args.extend(['--days', str(json_vars.get('days', 60))])
if 'dry_run' in json_vars and json_vars['dry_run'] and system_job.job_type != 'cleanup_facts':
args.extend(['--dry-run'])
if system_job.job_type == 'cleanup_jobs':
args.extend(['--jobs', '--project-updates', '--inventory-updates',
'--management-jobs', '--ad-hoc-commands', '--workflow-jobs',