1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-30 05:25:29 +03:00

Notes/todos.

This commit is contained in:
Chris Church 2013-04-02 13:11:07 -04:00
parent 0250537065
commit 9307e2de26
3 changed files with 7 additions and 1 deletions

View File

@ -403,6 +403,10 @@ class Host(CommonModelNameNotUnique):
import lib.urls import lib.urls
return reverse(lib.urls.views_HostsDetail, args=(self.pk,)) return reverse(lib.urls.views_HostsDetail, args=(self.pk,))
# relationship to LaunchJobStatus
# relationship to LaunchJobStatusEvent
# last_job_status
class Group(CommonModelNameNotUnique): class Group(CommonModelNameNotUnique):
''' '''

View File

@ -46,6 +46,7 @@ def run_launch_job(launch_job_status_pk):
cmdline = ['ansible-playbook', '-i', inventory_script]#, '-v'] cmdline = ['ansible-playbook', '-i', inventory_script]#, '-v']
cmdline.append(playbook) cmdline.append(playbook)
# FIXME: How to cancel/interrupt job? (not that important for now)
proc = subprocess.Popen(cmdline, stdout=subprocess.PIPE, proc = subprocess.Popen(cmdline, stdout=subprocess.PIPE,
stderr=subprocess.PIPE, env=env) stderr=subprocess.PIPE, env=env)
stdout, stderr = proc.communicate() stdout, stderr = proc.communicate()

View File

@ -59,6 +59,7 @@ class CallbackModule(object):
def _log_event(self, event, **event_data): def _log_event(self, event, **event_data):
#print '====', event, args, kwargs #print '====', event, args, kwargs
# self.playbook.inventory
if hasattr(self, 'launch_job_status'): if hasattr(self, 'launch_job_status'):
kwargs = { kwargs = {
'event': event, 'event': event,