there is no need to gather facts with O(N^2) way.
Only one node should gather facts from other node.
Fixes: #2553
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
setup:
delegate_to: "{{ item }}"
delegate_facts: True
- with_items: "{{ groups['all'] | difference(groups.get('clients', [])) }}"
+ with_items: "{{ groups['all'] }}"
+ run_once: true
when:
- delegate_facts_host | bool
delegate_to: "{{ item }}"
delegate_facts: True
with_items: "{{ groups['all'] }}"
+ run_once: true
when:
- delegate_facts_host | bool