Browse Source

On CoreOS, /etc/hosts does not always exist.

pull/162/head
Stig Telfer 8 years ago
parent
commit
ff03c82151
1 changed files with 1 additions and 0 deletions
  1. 1
      roles/kubernetes/preinstall/tasks/etchosts.yml

1
roles/kubernetes/preinstall/tasks/etchosts.yml

@ -5,6 +5,7 @@
regexp: "^{{ hostvars[item]['access_ip'] | default(hostvars[item]['ip'] | default(hostvars[item].ansible_default_ipv4.address)) }} {{ item }}$"
line: "{{ hostvars[item]['access_ip'] | default(hostvars[item]['ip'] | default(hostvars[item].ansible_default_ipv4.address)) }} {{ item }}"
state: present
create: yes
backup: yes
when: hostvars[item].ansible_default_ipv4.address is defined
with_items: groups['all']

Loading…
Cancel
Save