Skip to content
Snippets Groups Projects
Unverified Commit 13dda0e3 authored by k8s-ci-robot's avatar k8s-ci-robot Committed by GitHub
Browse files

Merge pull request #3207 from mirwan/fix_3206

Fix target hosts generation when /etc/hosts does not contain 127.0.0.1 or ::1
parents 6e7100f2 059cd17b
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@
- name: Hosts | Update target hosts file entries dict with required entries
set_fact:
etc_hosts_localhosts_dict_target: >-
{%- set target_entries = etc_hosts_localhosts_dict.get(item.key, []) | difference(item.value.get('unexpected' ,[])) -%}
{%- set target_entries = (etc_hosts_localhosts_dict|default({})).get(item.key, []) | difference(item.value.get('unexpected' ,[])) -%}
{{ etc_hosts_localhosts_dict_target|default({}) | combine({item.key: (target_entries + item.value.expected)|unique}) }}
with_dict: "{{ etc_hosts_localhost_entries }}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment