Pass the execution id to AnsibleAction
In order to read the queue with the websocket the execution id should be not None Change-Id: Idcf003cd5080b0aff3d76b2bf85d9aec18dccd34
This commit is contained in:
parent
4dd080d365
commit
ef286afe5a
|
@ -261,7 +261,7 @@ class AnsiblePlaybookAction(base.TripleOAction):
|
|||
self.queue_name = self._kwargs_for_run.pop('queue_name', None)
|
||||
self.reproduce_command = self._kwargs_for_run.pop(
|
||||
'reproduce_command', True)
|
||||
|
||||
self.execution_id = self._kwargs_for_run.pop('execution_id', None)
|
||||
self._work_dir = self._kwargs_for_run.pop(
|
||||
'work_dir', None)
|
||||
|
||||
|
@ -352,7 +352,7 @@ class AnsiblePlaybookAction(base.TripleOAction):
|
|||
'payload': {
|
||||
'message': ''.join(lines),
|
||||
'status': 'RUNNING',
|
||||
'execution': {'id': None}}}}
|
||||
'execution': {'id': self.execution_id}}}}
|
||||
|
||||
def run(self, context):
|
||||
if 0 < self.verbosity < 6:
|
||||
|
|
|
@ -119,6 +119,7 @@ workflows:
|
|||
limit_hosts: <% $.nodes %>
|
||||
module_path: <% $.module_path %>
|
||||
queue_name: <% $.ansible_queue_name %>
|
||||
execution_id: <% execution().id %>
|
||||
on-success:
|
||||
- node_update_passed: <% task().result.returncode = 0 %>
|
||||
- node_update_failed: <% task().result.returncode != 0 %>
|
||||
|
|
Loading…
Reference in New Issue