Browse Source

Merge pull request #501 from kubespray/nameserver_update_fix

Improve management of nameservers in resolv.conf
pull/504/head
Smaine Kahlouch 8 years ago
committed by GitHub
parent
commit
73a8c24089
1 changed files with 7 additions and 4 deletions
  1. 11
      roles/dnsmasq/tasks/main.yml

11
roles/dnsmasq/tasks/main.yml

@ -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:

Loading…
Cancel
Save