copy template dnsmasq pod and remove handlers
parent
2bd6b83656
commit
e0f460d9b5
|
@ -1,3 +0,0 @@
|
||||||
---
|
|
||||||
- name: restart dnsmasq
|
|
||||||
command: systemctl restart dnsmasq
|
|
|
@ -28,7 +28,6 @@
|
||||||
- '^127\.0\.0\.1(\s+){{ inventory_hostname }}.*'
|
- '^127\.0\.0\.1(\s+){{ inventory_hostname }}.*'
|
||||||
- '^::1(\s+){{ inventory_hostname }}.*'
|
- '^::1(\s+){{ inventory_hostname }}.*'
|
||||||
|
|
||||||
|
|
||||||
- name: ensure dnsmasq.d directory exists
|
- name: ensure dnsmasq.d directory exists
|
||||||
file:
|
file:
|
||||||
path: /etc/dnsmasq.d
|
path: /etc/dnsmasq.d
|
||||||
|
@ -41,10 +40,20 @@
|
||||||
dest: /etc/dnsmasq.d/01-kube-dns.conf
|
dest: /etc/dnsmasq.d/01-kube-dns.conf
|
||||||
mode: 755
|
mode: 755
|
||||||
backup: yes
|
backup: yes
|
||||||
notify:
|
|
||||||
- restart dnsmasq
|
|
||||||
when: inventory_hostname in groups['kube-master']
|
when: inventory_hostname in groups['kube-master']
|
||||||
|
|
||||||
|
- name: create dnsmasq pod template
|
||||||
|
template: src=dnsmasq-pod.yml dest=/etc/kubernetes/manifests/dnsmasq-pod.manifest
|
||||||
|
when: inventory_hostname in groups['kube-master']
|
||||||
|
|
||||||
|
- name: Check for dnsmasq port
|
||||||
|
wait_for:
|
||||||
|
port: 53
|
||||||
|
delay: 5
|
||||||
|
timeout: 100
|
||||||
|
when: inventory_hostname in groups['kube-master']
|
||||||
|
|
||||||
|
|
||||||
- name: update resolv.conf with new DNS setup
|
- name: update resolv.conf with new DNS setup
|
||||||
template:
|
template:
|
||||||
src: resolv.conf.j2
|
src: resolv.conf.j2
|
||||||
|
|
Loading…
Reference in New Issue