2021-08-17 00:06:42 +02:00
|
|
|
- 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"
|
2022-10-19 00:16:16 +02:00
|
|
|
become: "{{ do_become }}"
|
2021-08-17 00:06:42 +02:00
|
|
|
|
|
|
|
- name: Check if updatelist is installed
|
2022-04-15 15:51:58 +02:00
|
|
|
ansible.builtin.stat:
|
2021-08-17 00:06:42 +02:00
|
|
|
path: "/usr/local/sbin/pihole-updatelists"
|
|
|
|
register: updatelist_exec
|
|
|
|
|
|
|
|
- name: Activate changes
|
2022-04-15 15:51:58 +02:00
|
|
|
when: updatelist_exec.stat.exists
|
2022-10-19 00:16:16 +02:00
|
|
|
become: "{{ do_become }}"
|
2021-08-17 00:06:42 +02:00
|
|
|
ansible.builtin.command:
|
|
|
|
argv:
|
|
|
|
- pihole-updatelists
|