Last active
January 15, 2022 08:55
-
-
Save Weltraumschaf/1d875484e00f4c397a5841adda1573f1 to your computer and use it in GitHub Desktop.
Pi-hole unattended
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Install Git | |
apt: | |
name: | |
- git | |
state: latest | |
- name: Ensure there is a ~/src dir | |
file: | |
path: '$HOME/src' | |
state: directory | |
- name: Clone Pi-hole repo | |
git: | |
repo: https://github.com/pi-hole/pi-hole.git | |
dest: '$HOME/src/pi-hole' | |
- name: Ensure there is a /etc/pihole dir | |
file: | |
path: '/etc/pihole' | |
state: directory | |
- name: Copy setup vars | |
template: | |
src: setupVars.conf.j2 | |
dest: /etc/pihole/setupVars.conf | |
- name: Run Pi-hole installer | |
shell: '$HOME/src/pi-hole/automated\ install/basic-install.sh --unattended' | |
- name: Install cron to update pi-hole | |
cron: | |
name: 'Automatic update of pi-hole' | |
job: '/usr/local/bin/pihole -g' | |
minute: 0 | |
hour: 0 | |
become: no | |
- name: Install cron to update gravity | |
cron: | |
name: 'Automatic update of pi-hole gravity' | |
job: '/usr/local/bin/pihole -up' | |
minute: 0 | |
hour: 6 | |
weekday: 6 | |
become: no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment