mirror of https://github.com/ceph/ceph-ansible.git
main: exclude client nodes from facts gathering when delegate_facts_host
This commit excludes client nodes from facts gathering, they are not
needed and can speed up this task.
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 865d2eac9b
)
pull/4552/head
parent
857c68087d
commit
9a4fcfabe1
|
@ -13,9 +13,10 @@
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- name: gather facts
|
- name: gather facts
|
||||||
setup:
|
setup:
|
||||||
when: not delegate_facts_host | bool
|
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:
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
|
|
|
@ -24,13 +24,13 @@
|
||||||
# pre-tasks for following import -
|
# pre-tasks for following import -
|
||||||
- name: gather facts
|
- name: gather facts
|
||||||
setup:
|
setup:
|
||||||
when: not delegate_facts_host | bool
|
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:
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
delegate_facts: True
|
delegate_facts: True
|
||||||
with_items: "{{ groups['all'] }}"
|
with_items: "{{ groups['all'] | difference(groups.get('clients', [])) }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
when: delegate_facts_host | bool
|
when: delegate_facts_host | bool
|
||||||
|
|
||||||
|
|
|
@ -59,13 +59,13 @@
|
||||||
|
|
||||||
- name: gather facts
|
- name: gather facts
|
||||||
setup:
|
setup:
|
||||||
when: not delegate_facts_host | bool
|
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:
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
delegate_facts: True
|
delegate_facts: True
|
||||||
with_items: "{{ groups['all'] }}"
|
with_items: "{{ groups['all'] | difference(groups.get('clients', [])) }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
when: delegate_facts_host | bool
|
when: delegate_facts_host | bool
|
||||||
|
|
||||||
|
|
|
@ -28,13 +28,14 @@
|
||||||
# pre-tasks for following import -
|
# pre-tasks for following import -
|
||||||
- name: gather facts
|
- name: gather facts
|
||||||
setup:
|
setup:
|
||||||
when: not delegate_facts_host | bool
|
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:
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
delegate_facts: True
|
delegate_facts: True
|
||||||
with_items: "{{ groups['all'] }}"
|
with_items: "{{ groups['all'] | difference(groups.get('clients', [])) }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
when: delegate_facts_host | bool
|
when: delegate_facts_host | bool
|
||||||
|
|
||||||
|
|
|
@ -32,13 +32,14 @@
|
||||||
|
|
||||||
- name: gather facts
|
- name: gather facts
|
||||||
setup:
|
setup:
|
||||||
when: not delegate_facts_host | bool
|
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:
|
||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
delegate_facts: True
|
delegate_facts: True
|
||||||
with_items: "{{ groups['all'] }}"
|
with_items: "{{ groups['all'] | difference(groups.get('clients', [])) }}"
|
||||||
run_once: true
|
run_once: true
|
||||||
when: delegate_facts_host | bool
|
when: delegate_facts_host | bool
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue