From 6519bd6cc96daa1db72887e64612b55940e13c39 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Wed, 12 Jul 2017 16:07:57 +0100 Subject: [PATCH] Only gather facts when necessary We only need to gather facts once per host, and only when it's required. Doing it more often just slows down the deployment. Change-Id: Id11654218819a544c2b91c636c00374165b16559 --- playbooks/os-cinder-install.yml | 3 ++- playbooks/os-glance-install.yml | 3 ++- playbooks/os-keystone-install.yml | 3 ++- playbooks/os-neutron-install.yml | 2 +- playbooks/os-nova-install.yml | 3 ++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/playbooks/os-cinder-install.yml b/playbooks/os-cinder-install.yml index 6cf3da8759..6702db00b5 100644 --- a/playbooks/os-cinder-install.yml +++ b/playbooks/os-cinder-install.yml @@ -15,7 +15,7 @@ - name: Prepare MQ/DB services hosts: cinder_all - gather_facts: "{{ gather_facts | default(True) }}" + gather_facts: no user: root environment: "{{ deployment_environment_variables | default({}) }}" tags: @@ -96,6 +96,7 @@ # a long time if executed against a large inventory. - name: Refresh local facts after all software changes are made hosts: cinder_all + gather_facts: no max_fail_percentage: 20 user: root environment: "{{ deployment_environment_variables | default({}) }}" diff --git a/playbooks/os-glance-install.yml b/playbooks/os-glance-install.yml index f4980a131f..c998a110ae 100644 --- a/playbooks/os-glance-install.yml +++ b/playbooks/os-glance-install.yml @@ -15,7 +15,7 @@ - name: Prepare MQ/DB services hosts: glance_all - gather_facts: "{{ gather_facts | default(True) }}" + gather_facts: no user: root environment: "{{ deployment_environment_variables | default({}) }}" tags: @@ -80,6 +80,7 @@ # a long time if executed against a large inventory. - name: Refresh local facts after all software changes are made hosts: glance_all + gather_facts: no max_fail_percentage: 20 user: root environment: "{{ deployment_environment_variables | default({}) }}" diff --git a/playbooks/os-keystone-install.yml b/playbooks/os-keystone-install.yml index faf0fa6b72..caae686348 100644 --- a/playbooks/os-keystone-install.yml +++ b/playbooks/os-keystone-install.yml @@ -15,7 +15,7 @@ - name: Prepare MQ/DB services hosts: keystone_all - gather_facts: "{{ gather_facts | default(True) }}" + gather_facts: no user: root environment: "{{ deployment_environment_variables | default({}) }}" tags: @@ -148,6 +148,7 @@ # a long time if executed against a large inventory. - name: Finalise data migrations if required hosts: keystone_all + gather_facts: no max_fail_percentage: 20 user: root environment: "{{ deployment_environment_variables | default({}) }}" diff --git a/playbooks/os-neutron-install.yml b/playbooks/os-neutron-install.yml index 22bdce8f9b..43d5f048c9 100644 --- a/playbooks/os-neutron-install.yml +++ b/playbooks/os-neutron-install.yml @@ -30,7 +30,7 @@ - name: Prepare MQ/DB services hosts: neutron_all - gather_facts: "{{ gather_facts | default(True) }}" + gather_facts: no max_fail_percentage: 20 user: root environment: "{{ deployment_environment_variables | default({}) }}" diff --git a/playbooks/os-nova-install.yml b/playbooks/os-nova-install.yml index 65792ecc8f..725fae444c 100644 --- a/playbooks/os-nova-install.yml +++ b/playbooks/os-nova-install.yml @@ -15,7 +15,7 @@ - name: Prepare MQ/DB services hosts: nova_conductor - gather_facts: "{{ gather_facts | default(True) }}" + gather_facts: no user: root environment: "{{ deployment_environment_variables | default({}) }}" tags: @@ -132,6 +132,7 @@ # a long time if executed against a large inventory. - name: Refresh local facts after all software changes are made hosts: nova_all + gather_facts: no max_fail_percentage: 20 user: root environment: "{{ deployment_environment_variables | default({}) }}"