Pass execution_id to tripleo.ansible-playbook.

Passing the execution_id to the tripleo.ansible-playbook action will
make it such that the execution_id is included in any messages sent on
the queue.

This is needed so that when tripleoclient filters by execution id to
discard messages that are not from workflows it did not start, won't be
shown.

The tripleoclient patch to filter on execution_id is
https://review.openstack.org/#/c/605520/, but first we must land this
patch so that execution_id is added an input to these actions.

Change-Id: Icbe80c338d69efc6ce8fceb0f73f833bec588536
Related-Bug: #1794277
(cherry picked from commit 678d564619)
This commit is contained in:
James Slagle 2018-09-27 19:17:08 -04:00 committed by Dougal Matthews
parent 097d3f3385
commit b7da114421
6 changed files with 8 additions and 0 deletions

View File

@ -163,6 +163,7 @@ workflows:
wait_for_connection:
sleep: 5
timeout: 300
execution_id: <% execution().id %>
create_admin_via_ssh:
input:
@ -190,3 +191,4 @@ workflows:
playbook:
- hosts: overcloud
tasks: <% $.tasks %>
execution_id: <% execution().id %>

View File

@ -515,6 +515,7 @@ workflows:
blacklisted_hostnames: <% $.blacklisted_hostnames %>
override_ansible_cfg: <% $.override_ansible_cfg %>
command_timeout: <% $.config_download_timeout %>
execution_id: <% execution().id %>
publish:
log_path: <% task().result.get('log_path') %>
deployment_status: DEPLOY_SUCCESS

View File

@ -49,6 +49,7 @@ workflows:
fernet_keys: <% task(rotate_keys).result %>
use_openstack_credentials: true
playbook: /usr/share/tripleo-common/playbooks/rotate-keys.yaml
execution_id: <% execution().id %>
on-success: send_message
publish:
status: SUCCESS

View File

@ -108,6 +108,7 @@ workflows:
auth_username: <% $.auth_username %>
auth_password: <% $.auth_password %>
auth_project_name: <% $.auth_project_name %>
execution_id: <% execution().id %>
on-success: config_octavia
config_octavia:
@ -145,6 +146,7 @@ workflows:
generate_certs: <% $.generate_certs %>
mgmt_port_dev: <% $.mgmt_port_dev %>
auth_project_name: <% $.auth_project_name %>
execution_id: <% execution().id %>
on-complete: purge_local_temp_dir
purge_local_temp_dir:
action: tripleo.files.remove_temp_dir path=<% $.undercloud_local_dir %>

View File

@ -69,5 +69,6 @@ workflows:
ssh_private_key: <% $.private_key %>
extra_env_variables: <% $.ansible_extra_env_variables %>
extra_vars: <% $.extra_vars %>
execution_id: <% execution().id %>
publish:
output: <% task().result %>

View File

@ -31,3 +31,4 @@ workflows:
playbook: /usr/share/tripleo-common/playbooks/swift_ring_rebalance.yaml
inventory: <% $.get('work_dir') %>/<% $.get('container') %>/tripleo-ansible-inventory.yaml
use_openstack_credentials: true
execution_id: <% execution().id %>