added files to role
This commit is contained in:
2
defaults/main.yml
Normal file
2
defaults/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# defaults file for haup.gitea
|
||||
24
files/docker-compose.yaml.j2
Normal file
24
files/docker-compose.yaml.j2
Normal file
@@ -0,0 +1,24 @@
|
||||
version: "3"
|
||||
|
||||
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
|
||||
services:
|
||||
pihole:
|
||||
container_name: pihole
|
||||
image: pihole/pihole:latest
|
||||
# For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
|
||||
ports:
|
||||
- "53:53/tcp"
|
||||
- "53:53/udp"
|
||||
- "67:67/udp" # Only required if you are using Pi-hole as your DHCP server
|
||||
- "81:80/tcp"
|
||||
environment:
|
||||
TZ: 'Europe/Berlin'
|
||||
WEBPASSWORD: 'supersecure'
|
||||
# Volumes store your data between container upgrades
|
||||
volumes:
|
||||
- '{{ app_dir }}/data/etc-pihole:/etc/pihole'
|
||||
- '{{ app_dir }}/data/etc-dnsmasq.d:/etc/dnsmasq.d'
|
||||
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
|
||||
cap_add:
|
||||
- NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
|
||||
restart: unless-stopped
|
||||
2
handlers/main.yml
Normal file
2
handlers/main.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
---
|
||||
# handlers file for haup.gitea
|
||||
2
meta/.galaxy_install_info
Normal file
2
meta/.galaxy_install_info
Normal file
@@ -0,0 +1,2 @@
|
||||
install_date: Mon Oct 23 14:05:36 2023
|
||||
version: ''
|
||||
47
meta/main.yml
Normal file
47
meta/main.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
galaxy_info:
|
||||
author: Tim Unkrig
|
||||
description: homelab
|
||||
|
||||
# If the issue tracker for your role is not on github, uncomment the
|
||||
# next line and provide a value
|
||||
# issue_tracker_url: http://example.com/issue/tracker
|
||||
|
||||
# Choose a valid license ID from https://spdx.org - some suggested licenses:
|
||||
# - BSD-3-Clause (default)
|
||||
# - MIT
|
||||
# - GPL-2.0-or-later
|
||||
# - GPL-3.0-only
|
||||
# - Apache-2.0
|
||||
# - CC-BY-4.0
|
||||
license: "MIT"
|
||||
|
||||
min_ansible_version: "2.8"
|
||||
|
||||
# If this a Container Enabled role, provide the minimum Ansible Container version.
|
||||
# min_ansible_container_version:
|
||||
|
||||
#
|
||||
# Provide a list of supported platforms, and for each platform a list of versions.
|
||||
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
|
||||
# To view available platforms and versions (or releases), visit:
|
||||
# https://galaxy.ansible.com/api/v1/platforms/
|
||||
#
|
||||
platforms:
|
||||
- name: Debian
|
||||
versions:
|
||||
- "bookworm"
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- "jammy"
|
||||
|
||||
galaxy_tags: []
|
||||
# List tags for your role here, one per line. A tag is a keyword that describes
|
||||
# and categorizes the role. Users find roles by searching for tags. Be sure to
|
||||
# remove the '[]' above, if you add tags to this list.
|
||||
#
|
||||
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
|
||||
# Maximum 20 tags per role.
|
||||
|
||||
dependencies: []
|
||||
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
||||
# if you add dependencies to this list.
|
||||
29
tasks/main.yml
Normal file
29
tasks/main.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
# tasks file for pi-hole
|
||||
|
||||
- name: Create pi-hole directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ app_dir }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Create data directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ app_dir }}/data"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Templating docker-compose.yml
|
||||
ansible.builtin.template:
|
||||
src: files/docker-compose.yaml.j2
|
||||
dest: "{{ app_dir }}/docker-compose.yaml"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0660'
|
||||
validate: docker-compose config --quiet --file %s
|
||||
backup: true
|
||||
|
||||
- name: Start docker-compose
|
||||
community.docker.docker_compose:
|
||||
project_src: "{{ app_dir }}"
|
||||
state: present
|
||||
2
tests/inventory
Normal file
2
tests/inventory
Normal file
@@ -0,0 +1,2 @@
|
||||
localhost
|
||||
|
||||
5
tests/test.yml
Normal file
5
tests/test.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
remote_user: root
|
||||
roles:
|
||||
- haup.gitea
|
||||
3
vars/main.yml
Normal file
3
vars/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
# vars file for haup.gitea
|
||||
app_dir: "/srv/pi-hole"
|
||||
Reference in New Issue
Block a user