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
This commit is contained in:
James Slagle 2018-09-27 19:17:08 -04:00 committed by Alex Schultz
parent b031901a0e
commit 678d564619
6 changed files with 8 additions and 0 deletions

View File

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

View File

@ -509,6 +509,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

@ -56,6 +56,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

@ -106,6 +106,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:
@ -143,6 +144,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

@ -27,3 +27,4 @@ workflows:
playbook: /usr/share/tripleo-common/playbooks/swift_ring_rebalance.yaml
inventory: /usr/bin/tripleo-ansible-inventory
use_openstack_credentials: true
execution_id: <% execution().id %>