Adding self installation command for fabrica
This commit is contained in:
33
.packer/provisioning/playbooks/hole.yml
Normal file
33
.packer/provisioning/playbooks/hole.yml
Normal file
@ -0,0 +1,33 @@
|
||||
---
|
||||
- name: Configure Pi-Hole Server
|
||||
hosts: all
|
||||
|
||||
environment:
|
||||
http_proxy: "{{ lookup('env','http_proxy') }}"
|
||||
https_proxy: "{{ lookup('env','https_proxy') }}"
|
||||
HTTPS_PROXY: "{{ lookup('env','HTTPS_PROXY') }}"
|
||||
HTTP_PROXY: "{{ lookup('env','HTTP_PROXY') }}"
|
||||
|
||||
tasks:
|
||||
- name: Update package cache
|
||||
apt:
|
||||
update_cache: yes
|
||||
|
||||
- apt:
|
||||
name: curl
|
||||
|
||||
- apt:
|
||||
name: git
|
||||
|
||||
- git:
|
||||
repo: 'https://github.com/pi-hole/pi-hole.git'
|
||||
dest: /tmp/Pi-hole
|
||||
depth: 1
|
||||
|
||||
- name: Run 'install' for Pi-Hole
|
||||
shell: bash "/tmp/Pi-hole/automated install/basic-install.sh" --unattended
|
||||
|
||||
- name: Cleanup
|
||||
apt:
|
||||
name: make, curl, git
|
||||
state: absent
|
Reference in New Issue
Block a user