diff --git a/playbooks/common-playbooks/cinder.yml b/playbooks/common-playbooks/cinder.yml index 72d1b95595..4764d369ed 100644 --- a/playbooks/common-playbooks/cinder.yml +++ b/playbooks/common-playbooks/cinder.yml @@ -15,9 +15,22 @@ - name: Gather cinder facts hosts: "{{ cinder_hosts }}" - gather_facts: "{{ osa_gather_facts | default(True) }}" + gather_facts: false tags: - always + tasks: + - name: Gather minimal facts for cinder + setup: + gather_subset: + - "!all" + - min + when: osa_gather_facts | default(True) + + - name: Gather additional facts for cinder + setup: + gather_subset: "{{ cinder_gather_subset | default('processor_count') }}" + filter: "{{ cinder_gather_filter | default('ansible_processor*') }}" + when: osa_gather_facts | default(True) - name: Install cinder services hosts: "{{ cinder_hosts }}" diff --git a/playbooks/common-playbooks/neutron.yml b/playbooks/common-playbooks/neutron.yml index 20f9a67b9b..94fd9bc491 100644 --- a/playbooks/common-playbooks/neutron.yml +++ b/playbooks/common-playbooks/neutron.yml @@ -15,9 +15,22 @@ - name: Gather neutron facts hosts: "{{ neutron_hosts }}" - gather_facts: "{{ osa_gather_facts | default(True) }}" + gather_facts: false tags: - always + tasks: + - name: Gather minimal facts for neutron + setup: + gather_subset: + - "!all" + - min + when: osa_gather_facts | default(True) + + - name: Gather additional facts for neutron + setup: + gather_subset: "{{ neutron_gather_subset | default('processor_count') }}" + filter: "{{ neutron_gather_filter | default('ansible_processor*') }}" + when: osa_gather_facts | default(True) - name: Install neutron services hosts: "{{ neutron_hosts }}" @@ -55,8 +68,8 @@ include_tasks: "../common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml" vars: list_of_bind_mounts: - - bind_dir_path: "{{ (ansible_pkg_mgr == 'apt' and ansible_distribution_release != 'focal') | ternary('/lib/modules', '/usr/lib/modules') }}" - mount_path: "{{ (ansible_pkg_mgr == 'apt' and ansible_distribution_release != 'focal') | ternary('/lib/modules', '/usr/lib/modules') }}" + - bind_dir_path: "{{ (ansible_facts['pkg_mgr'] == 'apt' and ansible_facts['distribution_release'] != 'focal') | ternary('/lib/modules', '/usr/lib/modules') }}" + mount_path: "{{ (ansible_facts['pkg_mgr'] == 'apt' and ansible_facts['distribution_release'] != 'focal') | ternary('/lib/modules', '/usr/lib/modules') }}" extra_container_config: - "lxc.cgroup.devices.allow=a *:* rmw" extra_container_config_no_restart: diff --git a/playbooks/common-playbooks/nova.yml b/playbooks/common-playbooks/nova.yml index bd8f236c9d..f5aad2774e 100644 --- a/playbooks/common-playbooks/nova.yml +++ b/playbooks/common-playbooks/nova.yml @@ -15,14 +15,27 @@ - name: Gather nova facts hosts: "{{ nova_hosts }}" - gather_facts: "{{ osa_gather_facts | default(True) }}" + gather_facts: false tags: - always + tasks: + - name: Gather minimal facts for nova + setup: + gather_subset: + - "!all" + - min + when: osa_gather_facts | default(True) + + - name: Gather additional facts for nova + setup: + gather_subset: "{{ nova_gather_subset | default('processor_count') }}" + filter: "{{ nova_gather_filter | default('ansible_processor*') }}" + when: osa_gather_facts | default(True) - name: Install nova services hosts: "{{ nova_hosts }}" serial: "{{ nova_serial }}" - gather_facts: "{{ osa_gather_facts | default(True) }}" + gather_facts: false user: root environment: "{{ deployment_environment_variables | default({}) }}" vars_files: