From 86e3cf22ef0f46686188eb076f4f105215ddac10 Mon Sep 17 00:00:00 2001 From: marios Date: Wed, 11 Oct 2017 15:55:06 +0300 Subject: [PATCH] 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 --- common/deploy-steps.j2 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index 508e864d17..9a1f36c618 100644 --- a/common/deploy-steps.j2 +++ b/common/deploy-steps.j2 @@ -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