X-Git-Url: https://freie-schul-it.de/gitweb/fsit_smgt.git/blobdiff_plain/8177b1a20024dacccf082dac8d3c7f94391b9a85..cb248bdd6c4dc35025f8c53ba03dd22991af39dc:/tasks/pihole.yml diff --git a/tasks/pihole.yml b/tasks/pihole.yml index e7b3b31..de5478b 100644 --- a/tasks/pihole.yml +++ b/tasks/pihole.yml @@ -1,10 +1,16 @@ --- +- name: Update dns.domain.name per group_vars + ansible.builtin.command: + cmd: pihole-FTL --config dns.domain.name '{{ fsit_smgt_dns_domain_name }}' + register: ftl_dns_domain_name_response + changed_when: ftl_dns_domain_name_response.rc != 0 + when: fsit_smgt_dns_domain_name | length > 0 - name: Update ntp.sync.active per group_vars ansible.builtin.command: cmd: pihole-FTL --config ntp.sync.active '{{ fsit_smgt_ntp_sync_active }}' register: ftl_ntp_sync_active_response changed_when: ftl_ntp_sync_active_response.rc != 0 - when: fsit_smgt_ntp_sync_active | length > 0 + when: fsit_smgt_ntp_sync_active is defined - name: Update dns.upstreams per host_vars ansible.builtin.command: cmd: pihole-FTL --config dns.upstreams '{{ fsit_smgt_dns_upstreams | to_json }}'