From f90e509bf6e2af24f8a3fc8aa056ca3f6b4fe097 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Pi=C4=85tkowski?=
 <lukasz.piatkowski@aurea.com>
Date: Wed, 14 Feb 2018 15:43:41 +0000
Subject: [PATCH] gather facts for all nodes, even if running for single one
 (--limit)

---
 cluster.yml         | 6 ++++++
 upgrade-cluster.yml | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/cluster.yml b/cluster.yml
index 995e36309..7e4ff3f70 100644
--- a/cluster.yml
+++ b/cluster.yml
@@ -21,6 +21,12 @@
   vars:
     ansible_ssh_pipelining: true
   gather_facts: true
+  pre_tasks:
+    - name: gather facts from all instances
+      setup:
+      delegate_to: "{{item}}"
+      delegate_facts: True
+      with_items: "{{ groups['k8s-cluster'] + groups['etcd'] + groups['calico-rr'] }}"
 
 - hosts: k8s-cluster:etcd:calico-rr
   any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
diff --git a/upgrade-cluster.yml b/upgrade-cluster.yml
index d279f5635..88969436b 100644
--- a/upgrade-cluster.yml
+++ b/upgrade-cluster.yml
@@ -21,6 +21,12 @@
   vars:
     ansible_ssh_pipelining: true
   gather_facts: true
+  pre_tasks:
+    - name: gather facts from all instances
+      setup:
+      delegate_to: "{{item}}"
+      delegate_facts: True
+      with_items: "{{ groups['k8s-cluster'] + groups['etcd'] + groups['calico-rr'] }}"
 
 - hosts: k8s-cluster:etcd:calico-rr
   any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
-- 
GitLab