workbooks/deployment: add support to choose playbook name

In run_ansible task, adding support to change the playbook name, with
the default set to deploy_steps_playbook.yaml for backward
compatibility.
It will allow the tasks to be re-used by another workflow, like scale.

Change-Id: I8adeffb03836de3f1ace7d4311dbff353c10ea14
This commit is contained in:
Emilien Macchi 2019-05-07 10:58:08 +02:00
parent 68334a0041
commit 030ad3e281

View File

@ -388,6 +388,7 @@ workflows:
- override_ansible_cfg: ""
- config_download_timeout: 14400
- nodes: []
- playbook_name: deploy_steps_playbook.yaml
tags:
- tripleo-common-managed
@ -525,7 +526,7 @@ workflows:
execution: <% execution() %>
plan_name: <% $.plan_name %>
message: >
Running ansible playbook at <% $.get('work_dir') %>/<% $.get('plan_name') %>/deploy_steps_playbook.yaml.
Running ansible playbook at <% $.get('work_dir') %>/<% $.get('plan_name') %>/<% $.get('playbook_name') %>.
See log file at <% $.get('work_dir') %>/<% $.get('plan_name') %>/ansible.log for progress.
...
on-success: run_ansible
@ -534,8 +535,8 @@ workflows:
action: tripleo.ansible-playbook
input:
inventory: <% $.inventory %>
playbook: <% $.get('work_dir') %>/<% $.get('plan_name') %>/deploy_steps_playbook.yaml
playbook_name: deploy_steps_playbook.yaml
playbook: <% $.get('work_dir') %>/<% $.get('plan_name') %>/<% $.get('playbook_name') %>
playbook_name: <% $.get('playbook_name') %>
plan_name: <% $.plan_name %>
remote_user: tripleo-admin
ssh_private_key: <% $.private_key %>