Pass the execution id to AnsibleAction
In order to read the queue with the websocket
the execution id should be not None
Manual cherry pick
(Cherry-pick from: ef286afe5a
)
Change-Id: I244e4676b90a891c65e1457204b7fe0f3ade261f
This commit is contained in:
parent
d044d1e8c4
commit
6f3a7c2bae
|
@ -252,7 +252,7 @@ class AnsiblePlaybookAction(base.TripleOAction):
|
|||
self.extra_env_variables = self._kwargs_for_run.pop(
|
||||
'extra_env_variables', None)
|
||||
self.queue_name = self._kwargs_for_run.pop('queue_name', None)
|
||||
|
||||
self.execution_id = self._kwargs_for_run.pop('execution_id', None)
|
||||
self._work_dir = None
|
||||
|
||||
@property
|
||||
|
@ -342,7 +342,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:
|
||||
|
|
|
@ -148,6 +148,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