# HG changeset patch # User Luke Hoersten # Date 1593374916 18000 # Node ID 1ea4f1c7c675cab88dcb256b3dd297e3d55bfcc9 # Parent 9e4f750f5d369b81d232975ef76502f18a24533d Updated client templating in adguard. diff -r 9e4f750f5d36 -r 1ea4f1c7c675 adguard-home/defaults/main.yaml --- a/adguard-home/defaults/main.yaml Sun Jun 28 12:27:27 2020 -0500 +++ b/adguard-home/defaults/main.yaml Sun Jun 28 15:08:36 2020 -0500 @@ -3,3 +3,10 @@ adguard_home_arch: "arm" adguard_home_tar: "https://static.adguard.com/adguardhome/release/AdGuardHome_linux_{{adguard_home_arch}}.tar.gz" adguard_home_data_dir: "/var/lib/AdGuardHome" +adguard_home_filters: + - url: https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt + name: AdGuard Simplified Domain Names filter + id: 1 + - url: https://abp.oisd.nl + name: oisd.nl + id: 2 diff -r 9e4f750f5d36 -r 1ea4f1c7c675 adguard-home/handlers/main.yaml --- a/adguard-home/handlers/main.yaml Sun Jun 28 12:27:27 2020 -0500 +++ b/adguard-home/handlers/main.yaml Sun Jun 28 15:08:36 2020 -0500 @@ -2,4 +2,4 @@ - name: restart adguard home become: yes - systemd: name="AdGuardHome.service" enabled="yes" daemon_reload="yes" + systemd: name="AdGuardHome.service" enabled="yes" daemon_reload="yes" state="restarted" diff -r 9e4f750f5d36 -r 1ea4f1c7c675 adguard-home/templates/AdGuardHome.yaml.j2 --- a/adguard-home/templates/AdGuardHome.yaml.j2 Sun Jun 28 12:27:27 2020 -0500 +++ b/adguard-home/templates/AdGuardHome.yaml.j2 Sun Jun 28 15:08:36 2020 -0500 @@ -69,18 +69,13 @@ certificate_path: "" private_key_path: "" filters: +{% for filter in adguard_home_filters %} - enabled: true - url: https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt - name: AdGuard Simplified Domain Names filter - id: 1 -- enabled: false - url: https://adaway.org/hosts.txt - name: AdAway - id: 2 -- enabled: false - url: https://www.malwaredomainlist.com/hostslist/hosts.txt - name: MalwareDomainList.com Hosts List - id: 4 + url: {{filter.url}} + name: {{filter.name}} + id: {{filter.id}} +{% else %} [] +{% endfor %} whitelist_filters: [] user_rules: [] dhcp: @@ -92,7 +87,22 @@ range_end: "" lease_duration: 86400 icmp_timeout_msec: 1000 -clients: [] +clients: +{% for client in adguard_home_clients %} +- name: {{client.name}} + tags: [] + ids: + - {{client.ip}} + use_global_settings: {{not client.bypass}} + filtering_enabled: false + parental_enabled: false + safesearch_enabled: false + safebrowsing_enabled: false + use_global_blocked_services: {{not client.bypass}} + blocked_services: [] + upstreams: [] +{% else %} [] +{% endfor %} log_file: "" verbose: false schema_version: 6 diff -r 9e4f750f5d36 -r 1ea4f1c7c675 prometheus/server/tasks/main.yaml --- a/prometheus/server/tasks/main.yaml Sun Jun 28 12:27:27 2020 -0500 +++ b/prometheus/server/tasks/main.yaml Sun Jun 28 15:08:36 2020 -0500 @@ -33,6 +33,7 @@ ds_url: "http://localhost:9090" grafana_url: "http://localhost:3000" is_default: yes + changed_when: false - name: install grafana plugins become: yes