Handle dns_mode set to 'none' in generate nameservers task (#6825)
When dns_mode was set to 'none' the coredns_server became an empty string and invalid operation of adding string to list was executed.pull/6871/head
parent
102fb94524
commit
c93fa6effe
|
@ -131,6 +131,8 @@
|
|||
{{ [ skydns_server ] + [ skydns_server_secondary ] }}
|
||||
{%- elif dns_mode == 'manual' and not dns_early|bool -%}
|
||||
{{ ( manual_dns_server.split(',') | list) }}
|
||||
{%- elif dns_mode == 'none' and not dns_early|bool -%}
|
||||
[]
|
||||
{%- elif dns_early|bool -%}
|
||||
{{ upstream_dns_servers|default([]) }}
|
||||
{%- endif -%}
|
||||
|
@ -138,9 +140,9 @@
|
|||
- name: generate nameservers to resolvconf
|
||||
set_fact:
|
||||
nameserverentries:
|
||||
nameserver {{ ( coredns_server + nameservers|d([]) + cloud_resolver|d([])) | unique | join(',nameserver ') }}
|
||||
nameserver {{ ( coredns_server|d([]) + nameservers|d([]) + cloud_resolver|d([])) | unique | join(',nameserver ') }}
|
||||
supersede_nameserver:
|
||||
supersede domain-name-servers {{ ( coredns_server + nameservers|d([]) + cloud_resolver|d([])) | unique | join(', ') }};
|
||||
supersede domain-name-servers {{ ( coredns_server|d([]) + nameservers|d([]) + cloud_resolver|d([])) | unique | join(', ') }};
|
||||
|
||||
- name: gather os specific variables
|
||||
include_vars: "{{ item }}"
|
||||
|
|
Loading…
Reference in New Issue