Dnsmasq runs on all nodes

This commit is contained in:
Smaine Kahlouch 2016-03-21 11:37:35 +01:00
parent 48c64a1f72
commit 7e6d7caf4b
2 changed files with 6 additions and 8 deletions

View file

@ -13,6 +13,6 @@
roles:
- { role: kubernetes/master, tags: master }
- hosts: kube-master[0]
- hosts: k8s-cluster
roles:
- { role: dnsmasq, tags: dnsmasq }
- { role: dnsmasq, tags: dnsmasq }

View file

@ -37,10 +37,7 @@
- {file: dnsmasq-ds.yml, type: ds}
- {file: dnsmasq-svc.yml, type: svc}
register: manifests
# - name: Start resources
# command: create -f /etc/kubernetes/{{item.item.file}} --namespace=kube-system
# ignore_errors: yes
when: inventory_hostname == groups['kube-master'][0]
- name: Start Resources
kube:
@ -51,14 +48,15 @@
filename: /etc/kubernetes/{{item.item.file}}
state: "{{item.changed | ternary('latest','present') }}"
with_items: manifests.results
when: inventory_hostname == groups['kube-master'][0]
- name: Check for dnsmasq port (pulling image and running container)
wait_for:
host: "{{dns_server}}"
port: 53
delay: 5
when: inventory_hostname == groups['kube-master'][0]
- name: check resolvconf
stat: path=/etc/resolvconf/resolv.conf.d/head