Reorg updatelist, add personal whitelist
This commit is contained in:
parent
3dc2ee311a
commit
a87d91d615
@ -1,16 +0,0 @@
|
||||
- name: Install updatelist conf
|
||||
register: updatelist
|
||||
ansible.builtin.copy:
|
||||
src: "pihole-updatelists.conf"
|
||||
dest: "/etc/pihole-updatelists.conf"
|
||||
mode: "0644"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
become: true
|
||||
|
||||
- name: Activate changes
|
||||
when: updatelist.changed
|
||||
become: true
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- pihole-updatelists
|
@ -5,7 +5,7 @@
|
||||
ADLISTS_URL="https://v.firebog.net/hosts/lists.php?type=tick"
|
||||
|
||||
; Remote list URL containing exact domains to whitelist
|
||||
WHITELIST_URL="https://raw.githubusercontent.com/anudeepND/whitelist/master/domains/whitelist.txt"
|
||||
WHITELIST_URL="https://raw.githubusercontent.com/anudeepND/whitelist/master/domains/whitelist.txt https://gist.githubusercontent.com/Roxedus/9a03d22bf2af78cae4714ee23e74a63d/raw/c15b80f7ef9cd9cdc9f7c3e8fc5e7a077361a041/allowlist.txt"
|
||||
|
||||
; Remote list URL containing regex rules for whitelisting
|
||||
REGEX_WHITELIST_URL=""
|
29
ansible/roles/pihole_updatelist/tasks/main.yml
Normal file
29
ansible/roles/pihole_updatelist/tasks/main.yml
Normal file
@ -0,0 +1,29 @@
|
||||
- name: Checkout pihole_updatelist
|
||||
tags: [never, init, pihole]
|
||||
ansible.builtin.git:
|
||||
repo: "https://github.com/jacklul/pihole-updatelists.git"
|
||||
clone: yes
|
||||
dest: "/home/{{ users.0.username }}/pihole_updatelist"
|
||||
depth: 1
|
||||
|
||||
- name: Install updatelist conf
|
||||
register: updatelist
|
||||
ansible.builtin.copy:
|
||||
src: "pihole-updatelists.conf"
|
||||
dest: "/etc/pihole-updatelists.conf"
|
||||
mode: "0644"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
become: true
|
||||
|
||||
- name: Check if updatelist is installed
|
||||
stat:
|
||||
path: "/usr/local/sbin/pihole-updatelists"
|
||||
register: updatelist_exec
|
||||
|
||||
- name: Activate changes
|
||||
when: updatelist.changed and updatelist_exec.stat.exists
|
||||
become: true
|
||||
ansible.builtin.command:
|
||||
argv:
|
||||
- pihole-updatelists
|
Loading…
Reference in New Issue
Block a user