kubespray/roles/dnsmasq/templates/resolv.conf.j2

10 lines
355 B
Plaintext
Raw Normal View History

2015-10-04 04:19:50 +08:00
; generated by ansible
search {{ [ 'default.svc.' + dns_domain, 'svc.' + dns_domain, dns_domain ] | join(' ') }}
2015-12-11 18:48:43 +08:00
{% if inventory_hostname in groups['kube-master'] %}
nameserver {{ ansible_default_ipv4.address }}
{% else %}
2015-10-04 04:19:50 +08:00
{% for host in groups['kube-master'] %}
nameserver {{ hostvars[host]['ansible_default_ipv4']['address'] }}
{% endfor %}
2015-12-11 18:48:43 +08:00
{% endif %}