]> freie-schul-it.de Git - fsit_smgt.git/blob - tasks/pihole.yml
Caddy fuer reverseproxy mit ssl
[fsit_smgt.git] / tasks / pihole.yml
1 ---
2 - name: Update ntp.sync.active per group_vars
3 ansible.builtin.command:
4 cmd: pihole-FTL --config ntp.sync.active '{{ fsit_smgt_ntp_sync_active }}'
5 register: ftl_ntp_sync_active_response
6 changed_when: ftl_ntp_sync_active_response.rc != 0
7 when: fsit_smgt_ntp_sync_active is defined
8 - name: Update dns.upstreams per host_vars
9 ansible.builtin.command:
10 cmd: pihole-FTL --config dns.upstreams '{{ fsit_smgt_dns_upstreams | to_json }}'
11 register: ftl_dns_upstreams_response
12 changed_when: ftl_dns_upstreams_response.rc != 0
13 when: fsit_smgt_dns_upstreams | length > 0
14 - name: Update misc.dnsmasq_lines per host_vars
15 ansible.builtin.command:
16 cmd: pihole-FTL --config misc.dnsmasq_lines '{{ fsit_smgt_dnsmasq_lines | to_json }}'
17 register: ftl_dnsmasq_lines_response
18 changed_when: ftl_dnsmasq_lines_response.rc != 0
19 when: fsit_smgt_dnsmasq_lines | length > 0
20 - name: Update dns.hosts per group_vars
21 ansible.builtin.command:
22 cmd: pihole-FTL --config dns.hosts '{{ fsit_smgt_dns_hosts | to_json }}'
23 register: ftl_dns_hosts_response
24 changed_when: ftl_dns_hosts_response.rc != 0
25 when: fsit_smgt_dns_hosts | length > 0
26 - name: Update dhcp.hosts per host_vars
27 ansible.builtin.command:
28 cmd: pihole-FTL --config dhcp.hosts '{{ fsit_smgt_dhcp_hosts | to_json }}'
29 register: ftl_dhcp_hosts_response
30 changed_when: ftl_dhcp_hosts_response.rc != 0
31 when: fsit_smgt_dhcp_hosts | length > 0