Merge pull request #21 from le9i0nx/fix_check_run

fix run --check
This commit is contained in:
Maciej Delmanowski 2016-04-08 13:00:12 +02:00
commit 64ba0fb32e
2 changed files with 2 additions and 1 deletions

View File

@ -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:

View File

@ -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) %}