|
@ -63,22 +63,21 @@ |
|
|
|
|
|
|
|
|
- name: Add search resolv.conf |
|
|
- name: Add search resolv.conf |
|
|
lineinfile: |
|
|
lineinfile: |
|
|
line: search {{ [ 'default.svc.' + dns_domain, 'svc.' + dns_domain, dns_domain ] | join(' ') }} |
|
|
|
|
|
|
|
|
line: "search {{ [ 'default.svc.' + dns_domain, 'svc.' + dns_domain, dns_domain ] | join(' ') }}" |
|
|
dest: "{{resolvconffile}}" |
|
|
dest: "{{resolvconffile}}" |
|
|
state: present |
|
|
state: present |
|
|
insertbefore: BOF |
|
|
insertbefore: BOF |
|
|
backup: yes |
|
|
backup: yes |
|
|
follow: yes |
|
|
follow: yes |
|
|
|
|
|
|
|
|
- name: Add all masters as nameserver |
|
|
|
|
|
|
|
|
- name: Add local dnsmasq to resolv.conf |
|
|
lineinfile: |
|
|
lineinfile: |
|
|
line: nameserver {{ hostvars[item]['ansible_default_ipv4']['address'] }} |
|
|
|
|
|
|
|
|
line: "nameserver 127.0.0.1" |
|
|
dest: "{{resolvconffile}}" |
|
|
dest: "{{resolvconffile}}" |
|
|
state: present |
|
|
state: present |
|
|
insertafter: "^search.*$" |
|
|
insertafter: "^search.*$" |
|
|
backup: yes |
|
|
backup: yes |
|
|
follow: yes |
|
|
follow: yes |
|
|
with_items: groups['kube-master'] |
|
|
|
|
|
|
|
|
|
|
|
- name: Add options to resolv.conf |
|
|
- name: Add options to resolv.conf |
|
|
lineinfile: |
|
|
lineinfile: |
|
|