Reorg updatelist, add personal whitelist

This commit is contained in:
Roxedus 2021-08-17 00:06:42 +02:00
parent 3dc2ee311a
commit a87d91d615
Signed by: Roxedus
GPG Key ID: 9B4E311961C63639
3 changed files with 30 additions and 17 deletions

View File

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

View File

@ -5,7 +5,7 @@
ADLISTS_URL="https://v.firebog.net/hosts/lists.php?type=tick" ADLISTS_URL="https://v.firebog.net/hosts/lists.php?type=tick"
; Remote list URL containing exact domains to whitelist ; 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 ; Remote list URL containing regex rules for whitelisting
REGEX_WHITELIST_URL="" REGEX_WHITELIST_URL=""

View 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