From 6b506eea2ce86e41a7b8351f8641e3553ed8de2b Mon Sep 17 00:00:00 2001 From: James Slagle Date: Mon, 11 Jun 2018 17:55:13 -0400 Subject: [PATCH] Parallelize server pre and post steps Update the play for the server pre and post steps so that the tasks run in parallel across all roles, instead of doing one role at a time. By not using the "when" attribute, and relying on the tripleo_role_name var for the list of deployments, we can force these tasks to run in parallel across all roles. Change-Id: I83a4deaa68d5788edb5ab13652bb30c762f337d8 --- common/deploy-steps.j2 | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index b16872dd54..2857ed1277 100644 --- a/common/deploy-steps.j2 +++ b/common/deploy-steps.j2 @@ -446,13 +446,10 @@ outputs: gather_facts: no any_errors_fatal: yes tasks: -{%- for role in roles %} - - include_tasks: {{role.name}}/deployments.yaml + - include_tasks: deployments.yaml vars: force: false - when: tripleo_role_name == '{{role.name}}' - with_items: "{{ '{{' }} {{role.name}}_pre_deployments|default([]) {{ '}}' }}" -{%- endfor %} + with_items: "{{ '{{' }} lookup('vars', tripleo_role_name + '_pre_deployments')|default([]) {{ '}}' }}" tags: - overcloud - pre_deploy_steps @@ -525,13 +522,10 @@ outputs: gather_facts: no any_errors_fatal: yes tasks: -{%- for role in roles %} - - include_tasks: {{role.name}}/deployments.yaml + - include_tasks: deployments.yaml vars: force: false - when: tripleo_role_name == '{{role.name}}' - with_items: "{{ '{{' }} {{role.name}}_post_deployments|default([]) {{ '}}' }}" -{%- endfor %} + with_items: "{{ '{{' }} lookup('vars', tripleo_role_name + '_post_deployments')|default([]) {{ '}}' }}" tags: - overcloud - post_deploy_steps