From d26191373a58455ac77e712b190f1556c6f3097f Mon Sep 17 00:00:00 2001
From: Sergey <s.bondarev@southbridge.ru>
Date: Wed, 28 Apr 2021 21:34:50 +0300
Subject: [PATCH] add default empty value for etc_hosts_localhosts_dict_target
 (#7567)

---
 roles/kubernetes/preinstall/tasks/0090-etchosts.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/roles/kubernetes/preinstall/tasks/0090-etchosts.yml b/roles/kubernetes/preinstall/tasks/0090-etchosts.yml
index 491d24a6a..b011fd57b 100644
--- a/roles/kubernetes/preinstall/tasks/0090-etchosts.yml
+++ b/roles/kubernetes/preinstall/tasks/0090-etchosts.yml
@@ -66,7 +66,7 @@
     state: present
     backup: yes
     unsafe_writes: yes
-  loop: "{{ etc_hosts_localhosts_dict_target|dict2items }}"
+  loop: "{{ etc_hosts_localhosts_dict_target|default({})|dict2items }}"
 
 # gather facts to update ansible_fqdn
 - name: Update facts
-- 
GitLab