diff --git a/UpdateAdGuardBlacklist.yml b/UpdateAdGuardBlacklist.yml new file mode 100644 index 0000000..b218813 --- /dev/null +++ b/UpdateAdGuardBlacklist.yml @@ -0,0 +1,24 @@ +--- +- name: Update DNS blacklists on AdGuard + hosts: all + gather_facts: no # Disable gathering facts + + tasks: + - name: Update DNS blacklists + uri: + url: "https://dns1.lan/api/dnsblacklist/update" + method: POST + body_format: json + body: + blacklist_urls: + - "https://example.com/blacklist.txt" + - "https://anotherexample.com/blacklist.txt" + headers: + Authorization: "Bearer YOUR_API_TOKEN" + status_code: 200 + validate_certs: no + register: update_response + + - name: Check update response + debug: + var: update_response