From: Dimitri Savineau Date: Tue, 30 Jun 2020 14:13:42 +0000 (-0400) Subject: facts: explicitly disable facter and ohai X-Git-Tag: v6.0.0alpha2~146 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c95adc564b8be6f9f9b1ba8568072daf39da7a2c;p=ceph-ansible.git facts: explicitly disable facter and ohai By default, ansible gathers facts from facter and ohai if installed on the remote nodes, given we don't need them, let's exclude these facts from our facts gathering Signed-off-by: Dimitri Savineau --- diff --git a/infrastructure-playbooks/add-mon.yml b/infrastructure-playbooks/add-mon.yml index 3a6a76a23..c74c89589 100644 --- a/infrastructure-playbooks/add-mon.yml +++ b/infrastructure-playbooks/add-mon.yml @@ -16,12 +16,20 @@ - name: gather facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' when: not delegate_facts_host | bool or inventory_hostname in groups.get(client_group_name, []) - import_role: name: ceph-defaults - name: gather and delegate facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' delegate_to: "{{ item }}" delegate_facts: true with_items: "{{ groups[mon_group_name] }}" diff --git a/infrastructure-playbooks/add-osd.yml b/infrastructure-playbooks/add-osd.yml index 008973848..a47e084af 100644 --- a/infrastructure-playbooks/add-osd.yml +++ b/infrastructure-playbooks/add-osd.yml @@ -30,6 +30,10 @@ - name: gather facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' when: not delegate_facts_host | bool - import_role: @@ -37,6 +41,10 @@ - name: gather and delegate facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' delegate_to: "{{ item }}" delegate_facts: True with_items: @@ -63,6 +71,10 @@ - name: gather facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' when: not delegate_facts_host | bool - import_role: @@ -70,6 +82,10 @@ - name: gather and delegate facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' delegate_to: "{{ item }}" delegate_facts: True with_items: diff --git a/infrastructure-playbooks/cephadm-adopt.yml b/infrastructure-playbooks/cephadm-adopt.yml index 4e0525452..db4128927 100644 --- a/infrastructure-playbooks/cephadm-adopt.yml +++ b/infrastructure-playbooks/cephadm-adopt.yml @@ -44,10 +44,18 @@ - name: gather facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' when: not delegate_facts_host | bool or inventory_hostname in groups.get(client_group_name, []) - name: gather and delegate facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' delegate_to: "{{ item }}" delegate_facts: true with_items: "{{ groups['all'] | difference(groups.get('clients', [])) }}" diff --git a/infrastructure-playbooks/docker-to-podman.yml b/infrastructure-playbooks/docker-to-podman.yml index 123cba60e..5e9e048c6 100644 --- a/infrastructure-playbooks/docker-to-podman.yml +++ b/infrastructure-playbooks/docker-to-podman.yml @@ -27,10 +27,18 @@ # pre-tasks for following import - - name: gather facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' when: not delegate_facts_host | bool or inventory_hostname in groups.get(client_group_name, []) - name: gather and delegate facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' delegate_to: "{{ item }}" delegate_facts: True with_items: "{{ groups['all'] | difference(groups.get(client_group_name | default('clients'), [])) }}" diff --git a/infrastructure-playbooks/filestore-to-bluestore.yml b/infrastructure-playbooks/filestore-to-bluestore.yml index 170158e02..cd234b4d3 100644 --- a/infrastructure-playbooks/filestore-to-bluestore.yml +++ b/infrastructure-playbooks/filestore-to-bluestore.yml @@ -12,6 +12,10 @@ tasks: - name: gather and delegate facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' delegate_to: "{{ item }}" delegate_facts: True with_items: "{{ groups[mon_group_name] }}" @@ -279,6 +283,10 @@ - name: refresh ansible devices fact setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' filter: ansible_devices when: osd_auto_discovery | bool diff --git a/infrastructure-playbooks/purge-cluster.yml b/infrastructure-playbooks/purge-cluster.yml index e98ce43e9..93e43cf42 100644 --- a/infrastructure-playbooks/purge-cluster.yml +++ b/infrastructure-playbooks/purge-cluster.yml @@ -61,6 +61,10 @@ - block: - name: get nfs nodes ansible facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' delegate_to: "{{ item }}" delegate_facts: True with_items: "{{ groups[nfs_group_name] }}" diff --git a/infrastructure-playbooks/purge-container-cluster.yml b/infrastructure-playbooks/purge-container-cluster.yml index bf56df2cf..c326735a5 100644 --- a/infrastructure-playbooks/purge-container-cluster.yml +++ b/infrastructure-playbooks/purge-container-cluster.yml @@ -45,6 +45,10 @@ - block: - name: get nfs nodes ansible facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' delegate_to: "{{ item }}" delegate_facts: True with_items: "{{ groups[nfs_group_name] }}" @@ -249,6 +253,10 @@ - name: gather monitors facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' delegate_to: "{{ item }}" delegate_facts: True with_items: "{{ groups.get(mon_group_name | default('mons')) }}" diff --git a/infrastructure-playbooks/rolling_update.yml b/infrastructure-playbooks/rolling_update.yml index 314fe5292..c74ffd235 100644 --- a/infrastructure-playbooks/rolling_update.yml +++ b/infrastructure-playbooks/rolling_update.yml @@ -64,10 +64,18 @@ - name: gather facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' when: not delegate_facts_host | bool or inventory_hostname in groups.get(client_group_name, []) - name: gather and delegate facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' delegate_to: "{{ item }}" delegate_facts: True with_items: "{{ groups['all'] | difference(groups.get('clients', [])) }}" diff --git a/infrastructure-playbooks/shrink-rgw.yml b/infrastructure-playbooks/shrink-rgw.yml index 441a82c15..e8e9a6cd8 100644 --- a/infrastructure-playbooks/shrink-rgw.yml +++ b/infrastructure-playbooks/shrink-rgw.yml @@ -47,6 +47,10 @@ gather_facts: false tasks: - setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' - hosts: mons[0] become: true diff --git a/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml b/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml index 36a1526c7..b5ffcf102 100644 --- a/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml +++ b/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml @@ -47,6 +47,10 @@ - name: gather and delegate facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' delegate_to: "{{ item }}" delegate_facts: True with_items: "{{ groups['all'] | difference(groups.get(client_group_name, [])) }}" diff --git a/site-container.yml.sample b/site-container.yml.sample index ccbe14f9e..ed2595ee1 100644 --- a/site-container.yml.sample +++ b/site-container.yml.sample @@ -28,11 +28,19 @@ # pre-tasks for following import - - name: gather facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' when: not delegate_facts_host | bool or inventory_hostname in groups.get(client_group_name, []) tags: always - name: gather and delegate facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' delegate_to: "{{ item }}" delegate_facts: True with_items: "{{ groups['all'] | difference(groups.get('clients', [])) }}" diff --git a/site.yml.sample b/site.yml.sample index c29fc581b..49a899009 100644 --- a/site.yml.sample +++ b/site.yml.sample @@ -32,11 +32,19 @@ - name: gather facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' when: - not delegate_facts_host | bool or inventory_hostname in groups.get(client_group_name, []) - name: gather and delegate facts setup: + gather_subset: + - 'all' + - '!facter' + - '!ohai' delegate_to: "{{ item }}" delegate_facts: True with_items: "{{ groups['all'] | difference(groups.get('clients', [])) }}"