Add UpdateAdGuardBlacklist.yml

This commit is contained in:
Joshua Laymon 2024-04-26 01:32:14 +00:00
parent 83bb038d0e
commit 6a7d73fcf1

View File

@ -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