Add UpdateAdGuardBlacklist.yml
This commit is contained in:
parent
83bb038d0e
commit
6a7d73fcf1
24
UpdateAdGuardBlacklist.yml
Normal file
24
UpdateAdGuardBlacklist.yml
Normal 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
|
||||
Loading…
Reference in New Issue
Block a user