mirror of https://github.com/ceph/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 <dsavinea@redhat.com>
(cherry picked from commit c95adc564b
)
pull/5580/head
parent
3c3a232b77
commit
5db4219f26
|
@ -16,12 +16,20 @@
|
||||||
|
|
||||||
- name: gather facts
|
- name: gather facts
|
||||||
setup:
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
when: not delegate_facts_host | bool or inventory_hostname in groups.get(client_group_name, [])
|
when: not delegate_facts_host | bool or inventory_hostname in groups.get(client_group_name, [])
|
||||||
- import_role:
|
- import_role:
|
||||||
name: ceph-defaults
|
name: ceph-defaults
|
||||||
|
|
||||||
- name: gather and delegate facts
|
- name: gather and delegate facts
|
||||||
setup:
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
delegate_facts: true
|
delegate_facts: true
|
||||||
with_items: "{{ groups[mon_group_name] }}"
|
with_items: "{{ groups[mon_group_name] }}"
|
||||||
|
|
|
@ -30,10 +30,18 @@
|
||||||
|
|
||||||
- name: gather facts
|
- name: gather facts
|
||||||
setup:
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
when: not delegate_facts_host | bool
|
when: not delegate_facts_host | bool
|
||||||
|
|
||||||
- name: gather and delegate facts
|
- name: gather and delegate facts
|
||||||
setup:
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
delegate_facts: True
|
delegate_facts: True
|
||||||
with_items:
|
with_items:
|
||||||
|
@ -63,10 +71,18 @@
|
||||||
|
|
||||||
- name: gather facts
|
- name: gather facts
|
||||||
setup:
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
when: not delegate_facts_host | bool
|
when: not delegate_facts_host | bool
|
||||||
|
|
||||||
- name: gather and delegate facts
|
- name: gather and delegate facts
|
||||||
setup:
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
delegate_facts: True
|
delegate_facts: True
|
||||||
with_items:
|
with_items:
|
||||||
|
|
|
@ -27,10 +27,18 @@
|
||||||
# pre-tasks for following import -
|
# pre-tasks for following import -
|
||||||
- name: gather facts
|
- name: gather facts
|
||||||
setup:
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
when: not delegate_facts_host | bool or inventory_hostname in groups.get(client_group_name, [])
|
when: not delegate_facts_host | bool or inventory_hostname in groups.get(client_group_name, [])
|
||||||
|
|
||||||
- name: gather and delegate facts
|
- name: gather and delegate facts
|
||||||
setup:
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
delegate_facts: True
|
delegate_facts: True
|
||||||
with_items: "{{ groups['all'] | difference(groups.get(client_group_name | default('clients'), [])) }}"
|
with_items: "{{ groups['all'] | difference(groups.get(client_group_name | default('clients'), [])) }}"
|
||||||
|
|
|
@ -12,6 +12,10 @@
|
||||||
tasks:
|
tasks:
|
||||||
- name: gather and delegate facts
|
- name: gather and delegate facts
|
||||||
setup:
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
delegate_facts: True
|
delegate_facts: True
|
||||||
with_items: "{{ groups[mon_group_name] }}"
|
with_items: "{{ groups[mon_group_name] }}"
|
||||||
|
@ -279,6 +283,10 @@
|
||||||
|
|
||||||
- name: refresh ansible devices fact
|
- name: refresh ansible devices fact
|
||||||
setup:
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
filter: ansible_devices
|
filter: ansible_devices
|
||||||
when: osd_auto_discovery | bool
|
when: osd_auto_discovery | bool
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,10 @@
|
||||||
- block:
|
- block:
|
||||||
- name: get nfs nodes ansible facts
|
- name: get nfs nodes ansible facts
|
||||||
setup:
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
delegate_facts: True
|
delegate_facts: True
|
||||||
with_items: "{{ groups[nfs_group_name] }}"
|
with_items: "{{ groups[nfs_group_name] }}"
|
||||||
|
|
|
@ -45,6 +45,10 @@
|
||||||
- block:
|
- block:
|
||||||
- name: get nfs nodes ansible facts
|
- name: get nfs nodes ansible facts
|
||||||
setup:
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
delegate_facts: True
|
delegate_facts: True
|
||||||
with_items: "{{ groups[nfs_group_name] }}"
|
with_items: "{{ groups[nfs_group_name] }}"
|
||||||
|
@ -249,6 +253,10 @@
|
||||||
|
|
||||||
- name: gather monitors facts
|
- name: gather monitors facts
|
||||||
setup:
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
delegate_facts: True
|
delegate_facts: True
|
||||||
with_items: "{{ groups.get(mon_group_name | default('mons')) }}"
|
with_items: "{{ groups.get(mon_group_name | default('mons')) }}"
|
||||||
|
|
|
@ -64,10 +64,18 @@
|
||||||
|
|
||||||
- name: gather facts
|
- name: gather facts
|
||||||
setup:
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
when: not delegate_facts_host | bool or inventory_hostname in groups.get(client_group_name, [])
|
when: not delegate_facts_host | bool or inventory_hostname in groups.get(client_group_name, [])
|
||||||
|
|
||||||
- name: gather and delegate facts
|
- name: gather and delegate facts
|
||||||
setup:
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
delegate_facts: True
|
delegate_facts: True
|
||||||
with_items: "{{ groups['all'] | difference(groups.get('clients', [])) }}"
|
with_items: "{{ groups['all'] | difference(groups.get('clients', [])) }}"
|
||||||
|
|
|
@ -47,6 +47,10 @@
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
tasks:
|
tasks:
|
||||||
- setup:
|
- setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
|
|
||||||
- hosts: mons[0]
|
- hosts: mons[0]
|
||||||
become: true
|
become: true
|
||||||
|
|
|
@ -47,6 +47,10 @@
|
||||||
|
|
||||||
- name: gather and delegate facts
|
- name: gather and delegate facts
|
||||||
setup:
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
delegate_facts: True
|
delegate_facts: True
|
||||||
with_items: "{{ groups['all'] | difference(groups.get(client_group_name, [])) }}"
|
with_items: "{{ groups['all'] | difference(groups.get(client_group_name, [])) }}"
|
||||||
|
|
|
@ -28,11 +28,19 @@
|
||||||
# pre-tasks for following import -
|
# pre-tasks for following import -
|
||||||
- name: gather facts
|
- name: gather facts
|
||||||
setup:
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
when: not delegate_facts_host | bool or inventory_hostname in groups.get(client_group_name, [])
|
when: not delegate_facts_host | bool or inventory_hostname in groups.get(client_group_name, [])
|
||||||
tags: always
|
tags: always
|
||||||
|
|
||||||
- name: gather and delegate facts
|
- name: gather and delegate facts
|
||||||
setup:
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
delegate_facts: True
|
delegate_facts: True
|
||||||
with_items: "{{ groups['all'] | difference(groups.get('clients', [])) }}"
|
with_items: "{{ groups['all'] | difference(groups.get('clients', [])) }}"
|
||||||
|
|
|
@ -32,11 +32,19 @@
|
||||||
|
|
||||||
- name: gather facts
|
- name: gather facts
|
||||||
setup:
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
when:
|
when:
|
||||||
- not delegate_facts_host | bool or inventory_hostname in groups.get(client_group_name, [])
|
- not delegate_facts_host | bool or inventory_hostname in groups.get(client_group_name, [])
|
||||||
|
|
||||||
- name: gather and delegate facts
|
- name: gather and delegate facts
|
||||||
setup:
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- 'all'
|
||||||
|
- '!facter'
|
||||||
|
- '!ohai'
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
delegate_facts: True
|
delegate_facts: True
|
||||||
with_items: "{{ groups['all'] | difference(groups.get('clients', [])) }}"
|
with_items: "{{ groups['all'] | difference(groups.get('clients', [])) }}"
|
||||||
|
|
Loading…
Reference in New Issue