-
-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: ADDITION: Pi-hole #321
Open
bcurran3
wants to merge
16
commits into
davestephens:main
Choose a base branch
from
bcurran3:PiHole-----add
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
0202cd0
Add PiHole
bcurran3 c2c7edd
add Pi-hole
bcurran3 d156aff
add Pi-hole
bcurran3 3174ecf
add Pi-hole
bcurran3 971c11e
(without Traefik) visualization
bcurran3 7bb8775
add Pi-hole
bcurran3 bb71f39
add Pi-hole
bcurran3 81c7194
add Pi-hole
bcurran3 a5ceee8
ports fix
bcurran3 4169b7b
add Pi-hole (variables)
bcurran3 f2e15c6
better bullet point wording
bcurran3 486d0aa
add Pi-hole
bcurran3 81e3e5d
fix merge conflict
bcurran3 a603346
merge fix
bcurran3 1149494
homepage -> container unofficial styleguide fix
bcurran3 3a992e7
add Pi-hole
bcurran3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
# Pi-hole | ||
|
||
Homepage: [https://pi-hole.net/](https://pi-hole.net/) | ||
Docker Container: [https://hub.docker.com/r/pihole/pihole](https://hub.docker.com/r/pihole/pihole) | ||
|
||
Network-wide ad blocking, a black hole for Internet advertisements. | ||
|
||
## Usage | ||
|
||
Using Traefik: Set `pihole_with_traefik_enabled: true` in your `inventories/<your_inventory>/nas.yml` file. | ||
Not using Traefik: Set `pihole_without_traefik_enabled: true` in your `inventories/<your_inventory>/nas.yml` file. | ||
|
||
The Pi-hole web interface can be found at http://ansible_nas_host_or_ip/admin. |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
|
||
--- | ||
- name: Pi-hole (with Traefik) Directories | ||
file: | ||
path: "{{ item }}" | ||
state: directory | ||
with_items: | ||
- "{{ pihole_data_directory }}/etc/pihole" | ||
- "{{ pihole_data_directory }}/var/log/lighttpd" | ||
|
||
- name: Pi-hole (with Traefik) Docker Container | ||
docker_container: | ||
name: pihole | ||
image: pihole/pihole:latest | ||
pull: false | ||
volumes: | ||
- "{{ pihole_data_directory }}/etc/pihole:/etc/pihole:rw" | ||
- "{{ pihole_data_directory }}/etc/dnsmasq.d:/etc/dnsmasq.d:rw" | ||
- "{{ pihole_data_directory }}/var/log:/var/log:rw" | ||
ports: | ||
- "53:53/tcp" | ||
- "53:53/udp" | ||
- "8182:80" | ||
- "8183:443" | ||
env: | ||
DNS1: "{{ pihole_dns1 }}" | ||
DNS2: "{{ pihole_dns2 }}" | ||
ServerIP: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}" | ||
WEBPASSWORD: "{{ pihole_WEBPASSWORD }}" | ||
PROXY_LOCATION: "pihole" | ||
TZ: "{{ ansible_nas_timezone }}" | ||
VIRTUAL_HOST: "pihole.{{ ansible_nas_domain }}" | ||
VIRTUAL_PORT: "80" | ||
restart_policy: unless-stopped | ||
labels: | ||
traefik.enable: "true" | ||
traefik.backend: "pihole" | ||
traefik.port: "80" | ||
traefik.frontend.rule: "HostRegexp:pihole.{{ ansible_nas_domain }},{catchall:.*}" | ||
traefik.frontend.priority: "1" | ||
traefik.frontend.headers.SSLRedirect: "true" | ||
traefik.frontend.headers.STSSeconds: "315360000" | ||
traefik.frontend.headers.browserXSSFilter: "true" | ||
traefik.frontend.headers.contentTypeNosniff: "true" | ||
traefik.frontend.headers.forceSTSHeader: "true" | ||
traefik.frontend.headers.SSLHost: "{{ ansible_nas_domain }}" | ||
traefik.frontend.headers.STSIncludeSubdomains: "true" | ||
traefik.frontend.headers.STSPreload: "true" | ||
traefik.frontend.headers.frameDeny: "true" | ||
memory: 1g |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
|
||
--- | ||
- name: Pi-hole (without Traefik) Directories | ||
file: | ||
path: "{{ item }}" | ||
state: directory | ||
with_items: | ||
- "{{ pihole_data_directory }}/etc/pihole" | ||
- "{{ pihole_data_directory }}/var/log/lighttpd" | ||
|
||
- name: Pi-hole (without Traefik) Docker Container | ||
docker_container: | ||
name: pihole | ||
image: pihole/pihole:latest | ||
pull: false | ||
volumes: | ||
- "{{ pihole_data_directory }}/etc/pihole:/etc/pihole:rw" | ||
- "{{ pihole_data_directory }}/etc/dnsmasq.d:/etc/dnsmasq.d:rw" | ||
- "{{ pihole_data_directory }}/var/log:/var/log:rw" | ||
ports: | ||
- "53:53/tcp" | ||
- "53:53/udp" | ||
- "80:80" | ||
- "443:443" | ||
env: | ||
DNS1: "{{ pihole_dns1 }}" | ||
DNS2: "{{ pihole_dns2 }}" | ||
ServerIP: "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}" | ||
WEBPASSWORD: "{{ pihole_WEBPASSWORD }}" | ||
TZ: "{{ ansible_nas_timezone }}" | ||
restart_policy: unless-stopped | ||
memory: 1g |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing indentation, build fails due to invalid yaml