Use separate plays for Host prep steps
Instead of using one task include per role in the same play, use
separate plays instead. This reduces the amount of task skipping that
Ansible has to do since each include only applies to a single role.
In a deployment with many roles, this will improve performance.
Change-Id: I01ef631ea3dad8b9c030d61ed0883a9af13616ad
(cherry picked from commit 493d1c62fd
)
This commit is contained in:
parent
a0f6a5fc27
commit
805f4f9385
|
@ -453,21 +453,20 @@ outputs:
|
|||
tags:
|
||||
- overcloud
|
||||
- pre_deploy_steps
|
||||
{%- for role in roles %}
|
||||
|
||||
- hosts: {{primary_role_name}}:DEPLOY_TARGET_HOST
|
||||
name: Host prep steps
|
||||
- hosts: {{role.name}}
|
||||
name: {{role.name}} Host prep steps
|
||||
gather_facts: no
|
||||
any_errors_fatal: yes
|
||||
vars:
|
||||
bootstrap_server_id: BOOTSTRAP_SERVER_ID
|
||||
tasks:
|
||||
{%- for role in roles %}
|
||||
- import_tasks: {{role.name}}/host_prep_tasks.yaml
|
||||
when: tripleo_role_name == '{{role.name}}'
|
||||
{%- endfor %}
|
||||
tags:
|
||||
- overcloud
|
||||
- host_prep_steps
|
||||
{%- endfor %}
|
||||
|
||||
{%- for step in range(1,deploy_steps_max) %}
|
||||
|
||||
|
|
Loading…
Reference in New Issue