From 4f3597daf91409d1c287a271d452bb148e50d42a Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Tue, 9 Jun 2020 12:24:03 -0600 Subject: [PATCH] Collapse host prep tasks Since plays cannot be parallelized with a free-like strategy, we should have a single play that runs all host prep tasks rather than blocks of plays for each defined role. By switching to this method we have a single play that handles the host prep tasks concept that can be run all at once across a cloud. Change-Id: I2670840c9beac06f8b8ffc6eaecc88b9119ad298 (cherry picked from commit 3ef8f6008d41a88642d66a6a24c67210f773f87e) --- common/deploy-steps.j2 | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index 276205d5b8..9689955e22 100644 --- a/common/deploy-steps.j2 +++ b/common/deploy-steps.j2 @@ -632,10 +632,9 @@ outputs: - overcloud - pre_deploy_steps {% endraw %} -{%- for role in roles %} - - hosts: {{role.name}} - name: {{role.name}} Host prep steps + - hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST + name: Host prep steps gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}" any_errors_fatal: yes vars: @@ -651,16 +650,21 @@ outputs: docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET tasks: - - name: {{role.name}} Host prep steps - delegate_to: localhost - run_once: true - debug: - msg: Use --start-at-task "{{role.name}} Host prep steps" to resume from this task - - import_tasks: {{role.name}}/host_prep_tasks.yaml +{%- for role in roles %} + - name: {{role.name}} Host prep block + when: + - tripleo_role_name == '{{role.name}}' + block: + - name: {{role.name}} Host prep steps + delegate_to: localhost + run_once: true + debug: + msg: Use --start-at-task '{{role.name}} Host prep steps' to resume from this task + - import_tasks: {{role.name}}/host_prep_tasks.yaml +{%- endfor %} tags: - overcloud - host_prep_steps -{%- endfor %} {%- for step in range(1,deploy_steps_max) %}