From d3a8584212bc1882b52c9bda78060d8f72f6a2e7 Mon Sep 17 00:00:00 2001 From: Smaine Kahlouch Date: Tue, 19 Jan 2016 10:18:53 +0100 Subject: [PATCH] add timeout options to resolv.conf --- roles/dnsmasq/tasks/main.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/roles/dnsmasq/tasks/main.yml b/roles/dnsmasq/tasks/main.yml index f8b9fa197..d8050d514 100644 --- a/roles/dnsmasq/tasks/main.yml +++ b/roles/dnsmasq/tasks/main.yml @@ -80,6 +80,19 @@ follow: yes with_items: groups['kube-master'] +- name: Add options to resolv.conf + lineinfile: + line: options {{ item }} + dest: "{{resolvconffile}}" + state: present + regexp: "^options.*{{ item }}$" + insertafter: EOF + backup: yes + follow: yes + with_items: + - timeout:5 + - attempts:2 + - name: disable resolv.conf modification by dhclient copy: src=dhclient_nodnsupdate dest=/etc/dhcp/dhclient-enter-hooks.d/nodnsupdate mode=u+x backup=yes when: ansible_os_family == "Debian"