Added support and tests for --check option.

This commit is contained in:
Chris Church
2013-04-04 14:47:32 -04:00
parent e9aa3f78e2
commit 541445d60f
2 changed files with 37 additions and 1 deletions

View File

@@ -47,7 +47,9 @@ def run_launch_job(launch_job_status_pk):
env['ANSIBLE_TRANSPORT'] = getattr(settings, 'ANSIBLE_TRANSPORT')
playbook = launch_job.project.default_playbook
cmdline = ['ansible-playbook', '-i', inventory_script]#, '-v']
cmdline = ['ansible-playbook', '-i', inventory_script]
if launch_job.job_type == 'check':
cmdline.append('--check')
cmdline.append(playbook)
# FIXME: How to cancel/interrupt job? (not that important for now)