mirror of https://github.com/ceph/ceph-ansible.git
do not delegate facts on client nodes
This commit is a workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1550977 We iterate over all nodes on each node and we delegate the facts gathering. This is high memory consuming when having a large number of nodes in the inventory. That way of gathering is not necessary for clients node so we can simply gather local facts for these nodes. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/2494/head
parent
e32a177af8
commit
5b73be254d
|
@ -24,13 +24,13 @@
|
||||||
- name: gather facts
|
- name: gather facts
|
||||||
setup:
|
setup:
|
||||||
when:
|
when:
|
||||||
- not delegate_facts_host | bool
|
- not delegate_facts_host | bool or inventory_hostname in groups.get('clients', [])
|
||||||
|
|
||||||
- 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', [])) }}"
|
||||||
when:
|
when:
|
||||||
- delegate_facts_host | bool
|
- delegate_facts_host | bool
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue