Dnsmasq runs on all nodes
parent
48c64a1f72
commit
7e6d7caf4b
|
@ -13,6 +13,6 @@
|
||||||
roles:
|
roles:
|
||||||
- { role: kubernetes/master, tags: master }
|
- { role: kubernetes/master, tags: master }
|
||||||
|
|
||||||
- hosts: kube-master[0]
|
- hosts: k8s-cluster
|
||||||
roles:
|
roles:
|
||||||
- { role: dnsmasq, tags: dnsmasq }
|
- { role: dnsmasq, tags: dnsmasq }
|
|
@ -37,10 +37,7 @@
|
||||||
- {file: dnsmasq-ds.yml, type: ds}
|
- {file: dnsmasq-ds.yml, type: ds}
|
||||||
- {file: dnsmasq-svc.yml, type: svc}
|
- {file: dnsmasq-svc.yml, type: svc}
|
||||||
register: manifests
|
register: manifests
|
||||||
|
when: inventory_hostname == groups['kube-master'][0]
|
||||||
# - name: Start resources
|
|
||||||
# command: create -f /etc/kubernetes/{{item.item.file}} --namespace=kube-system
|
|
||||||
# ignore_errors: yes
|
|
||||||
|
|
||||||
- name: Start Resources
|
- name: Start Resources
|
||||||
kube:
|
kube:
|
||||||
|
@ -51,14 +48,15 @@
|
||||||
filename: /etc/kubernetes/{{item.item.file}}
|
filename: /etc/kubernetes/{{item.item.file}}
|
||||||
state: "{{item.changed | ternary('latest','present') }}"
|
state: "{{item.changed | ternary('latest','present') }}"
|
||||||
with_items: manifests.results
|
with_items: manifests.results
|
||||||
|
when: inventory_hostname == groups['kube-master'][0]
|
||||||
|
|
||||||
|
|
||||||
- name: Check for dnsmasq port (pulling image and running container)
|
- name: Check for dnsmasq port (pulling image and running container)
|
||||||
wait_for:
|
wait_for:
|
||||||
host: "{{dns_server}}"
|
host: "{{dns_server}}"
|
||||||
port: 53
|
port: 53
|
||||||
delay: 5
|
delay: 5
|
||||||
|
when: inventory_hostname == groups['kube-master'][0]
|
||||||
|
|
||||||
|
|
||||||
- name: check resolvconf
|
- name: check resolvconf
|
||||||
stat: path=/etc/resolvconf/resolv.conf.d/head
|
stat: path=/etc/resolvconf/resolv.conf.d/head
|
||||||
|
|
Loading…
Reference in New Issue