Agregando nueva configuración para instalar pihole
This commit is contained in:
1
proxmox/pihole/ansible/.gitignore
vendored
Normal file
1
proxmox/pihole/ansible/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
pihole.toml
|
||||
3
proxmox/pihole/ansible/ansible.cfg
Normal file
3
proxmox/pihole/ansible/ansible.cfg
Normal file
@@ -0,0 +1,3 @@
|
||||
[defaults]
|
||||
inventory = ./inventory.yaml
|
||||
host_key_checking = False
|
||||
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
|
||||
8
proxmox/pihole/ansible/inventory.yaml
Executable file
8
proxmox/pihole/ansible/inventory.yaml
Executable file
@@ -0,0 +1,8 @@
|
||||
all:
|
||||
children:
|
||||
servers:
|
||||
hosts:
|
||||
pihole:
|
||||
ansible_host: 192.168.3.1
|
||||
ansible_user: ubuntu
|
||||
ansible_ssh_private_key_file: /home/ryuuji/.ssh/id_ed25519
|
||||
1674
proxmox/pihole/ansible/pihole.toml.example
Normal file
1674
proxmox/pihole/ansible/pihole.toml.example
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user