Agregando nueva configuración para instalar pihole
This commit is contained in:
38
proxmox/pihole/ansible/install.yaml
Normal file
38
proxmox/pihole/ansible/install.yaml
Normal 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
|
||||
Reference in New Issue
Block a user