Use gather_extra_facts role from plugins collection

Remove the common-tasks version of this function and instead call
a role from the openstack-ansible-plugins collection.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-plugins/+/923403
Change-Id: I162de91b4988542b9301be76274c30e8e74d0d47
This commit is contained in:
Jonathan Rosser
2024-07-03 14:49:57 +01:00
parent 736d432707
commit 9a37e1fd0d
30 changed files with 68 additions and 53 deletions

View File

@@ -28,7 +28,8 @@
pre_tasks:
- name: Gather additional facts for monitor_address_block
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
vars:
deployment_extra_facts_filter: "ansible_all_ipv[4|6]_addresses"
deployment_extra_facts_subset: "!all,network"
@@ -41,7 +42,8 @@
- always
- name: Gather additional facts for monitor_interface
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
vars:
deployment_extra_facts_filter: "{{ 'ansible_' ~ monitor_interface | replace('-','_') }}"
deployment_extra_facts_subset: "!all,network"
@@ -54,7 +56,8 @@
- always
- name: Gather memory facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
vars:
deployment_extra_facts_filter: "ansible_memtotal*"
deployment_extra_facts_subset: "!all,hardware"
@@ -136,7 +139,8 @@
pre_tasks:
- name: Gather memory facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
vars:
deployment_extra_facts_filter: "ansible_memtotal*"
deployment_extra_facts_subset: "!all,hardware"
@@ -192,7 +196,8 @@
- "defaults/{{ install_method }}_install.yml"
pre_tasks:
- name: Gather memory facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
vars:
deployment_extra_facts_filter: "ansible_memtotal*"
deployment_extra_facts_subset: "!all,hardware"

View File

@@ -1,19 +0,0 @@
---
# Copyright 2021, City Network International AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Gather additional facts
setup:
gather_subset: "{{ deployment_extra_facts_subset }}"
filter: "{{ deployment_extra_facts_filter }}"

View File

@@ -18,7 +18,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -18,7 +18,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -18,7 +18,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -18,7 +18,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -18,7 +18,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -18,7 +18,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -18,7 +18,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -19,7 +19,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -21,7 +21,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -18,7 +18,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -18,7 +18,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -18,7 +18,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -18,7 +18,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -18,7 +18,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -35,7 +35,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -21,7 +21,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -41,7 +41,8 @@
- "defaults/{{ install_method }}_install.yml"
pre_tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
args:
apply:
tags:

View File

@@ -30,7 +30,8 @@
haveged_enabled: false
pre_tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
vars:
deployment_extra_facts_filter: "{{ 'ansible_' ~ pacemaker_corosync_ring_interface | replace('-','_') }}"
deployment_extra_facts_subset: "!all,network"
@@ -62,7 +63,8 @@
- "defaults/{{ install_method }}_install.yml"
pre_tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
args:
apply:
tags:

View File

@@ -18,7 +18,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -18,7 +18,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -18,7 +18,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -18,7 +18,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -18,7 +18,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -18,7 +18,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -18,7 +18,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -21,7 +21,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -18,7 +18,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
when: osa_gather_facts | default(True)
tags:
- always

View File

@@ -22,7 +22,8 @@
gather_facts: "{{ osa_gather_facts | default(True) }}"
tasks:
- name: Gather additional facts
include_tasks: "common-tasks/gather-hardware-facts.yml"
include_role:
name: openstack.osa.gather_extra_facts
vars:
deployment_extra_facts_filter: ansible_mounts
deployment_extra_facts_subset: "!all,hardware"