mirror of
https://github.com/dredx/prole.git
synced 2026-09-27 12:44:31 +00:00
32 lines
689 B
YAML
32 lines
689 B
YAML
---
|
|
- name: Ensure Pi-hole DB archive directory exists
|
|
ansible.builtin.file:
|
|
path: /var/lib/pihole/db-archive
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
|
|
- name: Install Pi-hole DB rotation script
|
|
ansible.builtin.copy:
|
|
src: rotate-pihole-db.sh
|
|
dest: /usr/local/sbin/rotate-pihole-db
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
|
|
- name: Stop Pi-hole FTL
|
|
ansible.builtin.systemd:
|
|
name: pihole-FTL
|
|
state: stopped
|
|
|
|
- name: Rotate Pi-hole FTL database
|
|
ansible.builtin.command:
|
|
cmd: /usr/local/sbin/rotate-pihole-db
|
|
changed_when: true
|
|
|
|
- name: Start Pi-hole FTL
|
|
ansible.builtin.systemd:
|
|
name: pihole-FTL
|
|
state: started
|