Speed up deployment by reusing facts
The overcloud deployment playbook consists of several plays. Facts gathered in a single playbook persist between plays, but by default each play gathers facts from involved nodes before applying any roles/tasks. That resulted in gathering facts many times. This commit changes the deployment playbook so that we gather facts once at the beginning, and then reuse them for subsequent plays. Also any_errors_fatal is added to make sure that when one host fails, subsequent tasks aren't attempted on the other hosts either. Change-Id: I192ea99105bd188554d45a6e4290bb33d1f08ff1
This commit is contained in:
parent
80eff5f4d7
commit
42b92efba3
@ -348,8 +348,13 @@ outputs:
|
||||
params:
|
||||
BOOTSTRAP_SERVER_ID: {get_param: [servers, {{primary_role_name}}, '0']}
|
||||
template: |
|
||||
- hosts: undercloud:overcloud
|
||||
name: Gather facts
|
||||
gather_facts: yes
|
||||
- hosts: overcloud
|
||||
name: Server deployments
|
||||
gather_facts: no
|
||||
any_errors_fatal: yes
|
||||
tasks:
|
||||
{%- for role in roles %}
|
||||
- include: {{role.name}}/deployments.yaml
|
||||
@ -360,6 +365,8 @@ outputs:
|
||||
{%- endfor %}
|
||||
- hosts: overcloud
|
||||
name: Deployment steps
|
||||
gather_facts: no
|
||||
any_errors_fatal: yes
|
||||
vars:
|
||||
bootstrap_server_id: BOOTSTRAP_SERVER_ID
|
||||
tasks:
|
||||
@ -370,12 +377,16 @@ outputs:
|
||||
{%- for step in range(1,deploy_steps_max) %}
|
||||
- hosts: undercloud
|
||||
name: Undercloud deployment step {{step}}
|
||||
gather_facts: no
|
||||
any_errors_fatal: yes
|
||||
vars:
|
||||
step: '{{step}}'
|
||||
tasks:
|
||||
- include: external_deploy_steps_tasks.yaml
|
||||
- hosts: overcloud
|
||||
name: Overcloud deployment step {{step}}
|
||||
gather_facts: no
|
||||
any_errors_fatal: yes
|
||||
vars:
|
||||
bootstrap_server_id: BOOTSTRAP_SERVER_ID
|
||||
step: '{{step}}'
|
||||
@ -384,6 +395,8 @@ outputs:
|
||||
{%- endfor %}
|
||||
- hosts: overcloud
|
||||
name: Server Post Deployments
|
||||
gather_facts: no
|
||||
any_errors_fatal: yes
|
||||
tasks:
|
||||
{%- for role in roles %}
|
||||
- include: {{role.name}}/deployments.yaml
|
||||
|
Loading…
Reference in New Issue
Block a user