From 75733daf23d56008b246d8c05c5069303edd4197 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Thu, 3 May 2018 18:41:16 +0200 Subject: [PATCH] playbook: improve facts gathering 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 --- site-docker.yml.sample | 3 ++- site.yml.sample | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/site-docker.yml.sample b/site-docker.yml.sample index 3ea16be3d..8949a09c2 100644 --- a/site-docker.yml.sample +++ b/site-docker.yml.sample @@ -30,7 +30,8 @@ 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 diff --git a/site.yml.sample b/site.yml.sample index 3a56a30b4..da6ecb372 100644 --- a/site.yml.sample +++ b/site.yml.sample @@ -59,6 +59,7 @@ delegate_to: "{{ item }}" delegate_facts: True with_items: "{{ groups['all'] }}" + run_once: true when: - delegate_facts_host | bool -- 2.47.3