---
-- name: Update dns.upstreams
+- name: Update dns.upstreams per host_vars
ansible.builtin.command:
cmd: pihole-FTL --config dns.upstreams '{{ fsit_smgt_dns_upstreams | to_json }}'
register: ftl_dns_upstreams_response
changed_when: ftl_dns_upstreams_response.rc != 0
- when: fsit_smgt_dns_upstreams |lenght > 0
-- name: Update misc.dnsmasq_lines
+ when: fsit_smgt_dns_upstreams | length > 0
+- name: Update misc.dnsmasq_lines per host_vars
ansible.builtin.command:
cmd: pihole-FTL --config misc.dnsmasq_lines '{{ fsit_smgt_dnsmasq_lines | to_json }}'
register: ftl_dnsmasq_lines_response
changed_when: ftl_dnsmasq_lines_response.rc != 0
- when: fsit_smgt_dnsmasq_lines |lenght > 0
+ when: fsit_smgt_dnsmasq_lines | length > 0
+- name: Update dns.hosts per group_vars
+ ansible.builtin.command:
+ cmd: pihole-FTL --config dns.hosts '{{ fsit_smgt_dns_hosts | to_json }}'
+ register: ftl_dns_hosts_response
+ changed_when: ftl_dns_hosts_response.rc != 0
+ when: fsit_smgt_dns_hosts | length > 0
+- name: Update dhcp.hosts per host_vars
+ ansible.builtin.command:
+ cmd: pihole-FTL --config dhcp.hosts '{{ fsit_smgt_dhcp_hosts | to_json }}'
+ register: ftl_dhcp_hosts_response
+ changed_when: ftl_dhcp_hosts_response.rc != 0
+ when: fsit_smgt_dhcp_hosts | length > 0