Merge pull request #871 from mattymo/fix_system_search_domains
Fix docker dns host scenario with no search domainspull/874/head
commit
10dbd0afbd
|
@ -40,13 +40,13 @@
|
|||
|
||||
- name: add system nameservers to docker options
|
||||
set_fact:
|
||||
docker_dns_servers: "{{ docker_dns_servers + [item] }}"
|
||||
with_items: "{{ system_nameservers.stdout_lines|default([]) }}"
|
||||
docker_dns_servers: "{{ docker_dns_servers | union(system_nameservers.stdout_lines) | unique }}"
|
||||
when: system_nameservers.stdout != ""
|
||||
|
||||
- name: add system search domains to docker options
|
||||
set_fact:
|
||||
docker_dns_search_domains: "{{ docker_dns_search_domains + [item] }}"
|
||||
with_items: "{{ system_search_domains.stdout.split(' ') }}"
|
||||
docker_dns_search_domains: "{{ docker_dns_search_domains | union(system_search_domains.stdout.split(' ')|default([])) | unique }}"
|
||||
when: system_search_domains.stdout != ""
|
||||
|
||||
- name: check number of nameservers
|
||||
fail: msg="Too many nameservers"
|
||||
|
|
Loading…
Reference in New Issue