fix run --check
This commit is contained in:
parent
8053f8c2ab
commit
79d3afccb7
@ -32,6 +32,7 @@
|
|||||||
register: dhcpd_register_nameservers
|
register: dhcpd_register_nameservers
|
||||||
changed_when: False
|
changed_when: False
|
||||||
when: dhcpd_mode == 'server'
|
when: dhcpd_mode == 'server'
|
||||||
|
always_run: yes
|
||||||
|
|
||||||
- name: Convert list of nameservers to Ansible list
|
- name: Convert list of nameservers to Ansible list
|
||||||
set_fact:
|
set_fact:
|
||||||
|
@ -6,10 +6,10 @@ option domain-search "{{ dhcpd_tpl_domain_search | join('", "') }}";
|
|||||||
option dhcp6.domain-search "{{ dhcpd_tpl_domain_search | join('", "') }}";
|
option dhcp6.domain-search "{{ dhcpd_tpl_domain_search | join('", "') }}";
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% set dhcpd_tpl_nameservers = [] %}
|
||||||
{% if dhcpd_nameservers|d() and dhcpd_nameservers %}
|
{% if dhcpd_nameservers|d() and dhcpd_nameservers %}
|
||||||
{% set dhcpd_tpl_nameservers = dhcpd_nameservers %}
|
{% set dhcpd_tpl_nameservers = dhcpd_nameservers %}
|
||||||
{% elif dhcpd_runtime_nameservers|d() and dhcpd_runtime_nameservers %}
|
{% elif dhcpd_runtime_nameservers|d() and dhcpd_runtime_nameservers %}
|
||||||
{% set dhcpd_tpl_nameservers = [] %}
|
|
||||||
{% for server in dhcpd_runtime_nameservers %}
|
{% for server in dhcpd_runtime_nameservers %}
|
||||||
{% if server not in [ '127.0.0.1', '::1' ] %}
|
{% if server not in [ '127.0.0.1', '::1' ] %}
|
||||||
{% set _ = dhcpd_tpl_nameservers.append(server) %}
|
{% set _ = dhcpd_tpl_nameservers.append(server) %}
|
||||||
|
Loading…
Reference in New Issue
Block a user