Agregando nueva configuración para instalar pihole

This commit is contained in:
2025-11-08 21:38:24 -03:00
parent 6abc71f90e
commit 056f0cdb1d
11 changed files with 2033 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
- name: Install Pihole
hosts: all
become: true
tasks:
- name: Update packages
apt:
update_cache: true
upgrade: safe
- name: Install curl
apt:
name: curl
- name: Create pihole directory
file:
path: /etc/pihole
state: directory
force: false
- name: Load pihole pre-configuration
copy:
src: pihole.toml
dest: /etc/pihole/pihole.toml
- name: Download install script
get_url:
url: https://install.pi-hole.net
dest: /tmp/install_pihole.sh
mode: "0755"
- name: Install pihole
command: /tmp/install_pihole.sh --unattended
args:
creates: "/usr/local/bin/pihole"
- name: Update gravity lists
command: pihole -g