Merge pull request #501 from kubespray/nameserver_update_fix

Improve management of nameservers in resolv.conf
This commit is contained in:
Smaine Kahlouch 2016-09-22 18:49:29 +02:00 committed by GitHub
commit 73a8c24089

View file

@ -86,14 +86,17 @@
follow: yes
- name: Add local dnsmasq to resolv.conf
lineinfile:
line: "nameserver {{item}}"
blockinfile:
dest: "{{resolvconffile}}"
block: |-
{% for item in nameserverentries -%}
nameserver {{ item }}
{% endfor %}
state: present
insertafter: "^search.*$"
create: yes
backup: yes
follow: yes
with_items: "{{nameserverentries}}"
marker: "# Ansible nameservers {mark}"
- name: Add options to resolv.conf
lineinfile: