From 5b73be254d249a23ac2eb2f86c4412ef296352a9 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 21 Mar 2018 19:01:51 +0100 Subject: [PATCH] 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 --- site-docker.yml.sample | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site-docker.yml.sample b/site-docker.yml.sample index 58098ad3c..6f64ceb72 100644 --- a/site-docker.yml.sample +++ b/site-docker.yml.sample @@ -24,13 +24,13 @@ - name: gather facts setup: when: - - not delegate_facts_host | bool + - not delegate_facts_host | bool or inventory_hostname in groups.get('clients', []) - name: gather and delegate facts setup: delegate_to: "{{ item }}" delegate_facts: True - with_items: "{{ groups['all'] }}" + with_items: "{{ groups['all'] | difference(groups.get('clients', [])) }}" when: - delegate_facts_host | bool -- 2.39.5