You've already forked role_dnsmasq
fix: Merge hosts and auto
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
{% for ip in dnsmasq_host_ips %}
|
||||
{{ ip }} {{ dnsmasq_client_hostname }} {{ dnsmasq_host_aliases | join(' ') }}
|
||||
{% endfor %}
|
@@ -1,8 +1,6 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
# ansible inventory
|
||||
{%- set hosts = groups[dnsmasq_ansible_group] | reject('equalto', inventory_hostname) | sort %}
|
||||
{%- for host in hosts %}
|
||||
{%- for host in groups[dnsmasq_ansible_group] | sort %}
|
||||
{%- set ipv4 = hostvars[host]['ansible_host'] %}
|
||||
{%- set ipv6_prefix = dnsmasq_ipv6_subnet | split('/') | first %}
|
||||
{%- set ipv6_suffix = hostvars[host]['ansible_host'] | split('.') | last %}
|
||||
@@ -12,12 +10,3 @@
|
||||
{{ ipv4 }} {{ aliases | join(' ') }}
|
||||
{{ ipv6_prefix }}{{ ipv6_suffix }} {{ aliases | join(' ') }}
|
||||
{% endfor %}
|
||||
|
||||
# role specifics
|
||||
{%- for specific in dnsmasq_specifics %}
|
||||
|
||||
## {{ specific.hostname }}
|
||||
{% for ip in specific.ips %}
|
||||
{{ ip }} {{ specific.hostname }}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
9
templates/records_specific.conf.j2
Normal file
9
templates/records_specific.conf.j2
Normal file
@@ -0,0 +1,9 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
{%- for specific in dnsmasq_specifics %}
|
||||
|
||||
## {{ specific.hostname }}
|
||||
{% for ip in specific.ips %}
|
||||
{{ ip }} {{ specific.hostname }}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
Reference in New Issue
Block a user