Use inline update for resolv.conf

This commit is contained in:
ant31
2016-01-05 12:23:14 +01:00
parent 9a03249446
commit 9c461e1018
2 changed files with 36 additions and 14 deletions

View File

@@ -1,9 +0,0 @@
; generated by ansible
search {{ [ 'default.svc.' + dns_domain, 'svc.' + dns_domain, dns_domain ] | join(' ') }}
{% if inventory_hostname in groups['kube-master'] %}
nameserver {{ ansible_default_ipv4.address }}
{% else %}
{% for host in groups['kube-master'] %}
nameserver {{ hostvars[host]['ansible_default_ipv4']['address'] }}
{% endfor %}
{% endif %}