Skip to content
Snippets Groups Projects
Commit a17e466a authored by Antoine Legrand's avatar Antoine Legrand
Browse files

Merge pull request #162 from oneswig/master

On CoreOS, /etc/hosts does not always exist.
parents a46d4efb ff03c821
No related branches found
No related tags found
No related merge requests found
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
regexp: "^{{ hostvars[item]['access_ip'] | default(hostvars[item]['ip'] | default(hostvars[item].ansible_default_ipv4.address)) }} {{ item }}$" 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 }}" line: "{{ hostvars[item]['access_ip'] | default(hostvars[item]['ip'] | default(hostvars[item].ansible_default_ipv4.address)) }} {{ item }}"
state: present state: present
create: yes
backup: yes backup: yes
when: hostvars[item].ansible_default_ipv4.address is defined when: hostvars[item].ansible_default_ipv4.address is defined
with_items: groups['all'] with_items: groups['all']
......
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