Merge pull request #871 from mattymo/fix_system_search_domains

Fix docker dns host scenario with no search domains
pull/874/head
Bogdan Dobrelya 2017-01-09 15:52:12 +01:00 committed by GitHub
commit 10dbd0afbd
1 changed files with 4 additions and 4 deletions

View File

@ -40,13 +40,13 @@
- name: add system nameservers to docker options - name: add system nameservers to docker options
set_fact: set_fact:
docker_dns_servers: "{{ docker_dns_servers + [item] }}" docker_dns_servers: "{{ docker_dns_servers | union(system_nameservers.stdout_lines) | unique }}"
with_items: "{{ system_nameservers.stdout_lines|default([]) }}" when: system_nameservers.stdout != ""
- name: add system search domains to docker options - name: add system search domains to docker options
set_fact: set_fact:
docker_dns_search_domains: "{{ docker_dns_search_domains + [item] }}" docker_dns_search_domains: "{{ docker_dns_search_domains | union(system_search_domains.stdout.split(' ')|default([])) | unique }}"
with_items: "{{ system_search_domains.stdout.split(' ') }}" when: system_search_domains.stdout != ""
- name: check number of nameservers - name: check number of nameservers
fail: msg="Too many nameservers" fail: msg="Too many nameservers"