Add post_upgrade_tasks with post_upgrade_steps_playbook output

This wires up the post_upgrade_tasks tasks to be written as
ansible playbooks like the upgrade/update_tasks. This will
write out a post_upgrade_steps_playbook ansible playbook.

Used in https://review.openstack.org/#/c/489201/ by ODL
and https://review.openstack.org/#/c/505603/ cinder-volume
Q upgrade spec @ Ibde21e6efae3a7d311bee526d63c5692c4e27b28
Related Blueprint: major-upgrade-workflow

Change-Id: Ib6188c91076eabf20d6e358ca247fed802369a7f
This commit is contained in:
marios 2017-10-11 15:55:06 +03:00 committed by Tim Rozet
parent 5926cbaa90
commit 86e3cf22ef
1 changed files with 13 additions and 0 deletions

View File

@ -20,6 +20,7 @@
{% set deploy_steps_max = 6 -%}
{% set update_steps_max = 6 -%}
{% set upgrade_steps_max = 6 -%}
{% set post_upgrade_steps_max = 2 -%}
heat_template_version: queens
@ -553,3 +554,15 @@ outputs:
with_sequence: start=0 end={{upgrade_steps_max-1}}
loop_control:
loop_var: step
post_upgrade_steps_tasks: |
{%- for role in roles %}
- include: {{role.name}}/post_upgrade_tasks.yaml
when: role_name == '{{role.name}}'
{%- endfor %}
post_upgrade_steps_playbook: |
- hosts: overcloud
tasks:
- include: post_upgrade_steps_tasks.yaml
with_sequence: start=0 end={{post_upgrade_steps_max-1}}
loop_control:
loop_var: step