Make spliting system_search_domains more robust
The search line in /etc/resolv.conf could have multiple spaces or tabs between domains. split(' ') will give wrong results in some case, use split() without argument instead. e.g. >>> 'domain.tld cluster.tld '.split(' ') ['domain.tld\tcluster.tld', ''] >>> 'domain.tld cluster.tld '.split() ['domain.tld', 'cluster.tld']pull/2074/head
parent
39ce1bd8be
commit
91d848f98a
|
@ -47,7 +47,7 @@
|
|||
|
||||
- name: add system search domains to docker options
|
||||
set_fact:
|
||||
docker_dns_search_domains: "{{ docker_dns_search_domains | union(system_search_domains.stdout.split(' ')|default([])) | unique }}"
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue