added role to repo

This commit is contained in:
Tim Unkrig
2024-05-10 12:33:32 +02:00
parent 0f16120414
commit 5af51ed535
10 changed files with 124 additions and 0 deletions

9
LICENSE copy Normal file
View File

@@ -0,0 +1,9 @@
MIT License
Copyright (c) 2023 ansible-roles
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

2
defaults/main.yml Normal file
View File

@@ -0,0 +1,2 @@
---
# defaults file for haup.gitea

View File

@@ -0,0 +1,22 @@
version: "3"
services:
app:
image: 'jc21/nginx-proxy-manager:latest'
restart: unless-stopped
ports:
- '80:80'
- '443:443'
- '8181:81'
# Add any other Stream poOrt you want to expose
- '2222:2222' # gitea SSH
environment:
X_FRAME_OPTIONS: "sameorigin"
DB_SQLITE_FILE: "/data/database.sqlite"
DISABLE_IPV6: "true"
volumes:
- {{ npm_app_dir }}:/data
- {{ letsencrypt_dir }}:/etc/letsencrypt
healthcheck:
test: ["CMD", "/bin/check-health"]
interval: 10s
timeout: 3s

2
handlers/main.yml Normal file
View File

@@ -0,0 +1,2 @@
---
# handlers file for haup.gitea

View File

@@ -0,0 +1,2 @@
install_date: Mon Oct 23 14:05:36 2023
version: ''

47
meta/main.yml Normal file
View File

@@ -0,0 +1,47 @@
galaxy_info:
author: Tim Unkrig
description: docker install 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: license (GPL-2.0-or-later, MIT, etc)
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
View File

@@ -0,0 +1,29 @@
---
# tasks file for pi-hole
- name: Create npm-hole directory
ansible.builtin.file:
path: "{{ npm_app_dir }}"
state: directory
mode: '0755'
- name: Create data directory
ansible.builtin.file:
path: "{{ npm_app_dir }}/data"
state: directory
mode: '0755'
- name: Templating docker-compose.yml
ansible.builtin.template:
src: files/docker-compose.yaml.j2
dest: "{{ npm_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: "{{ npm_app_dir }}"
state: present

2
tests/inventory Normal file
View File

@@ -0,0 +1,2 @@
localhost

5
tests/test.yml Normal file
View File

@@ -0,0 +1,5 @@
---
- hosts: localhost
remote_user: root
roles:
- haup.gitea

4
vars/main.yml Normal file
View File

@@ -0,0 +1,4 @@
---
# vars file for haup.gitea
npm_app_dir: "/srv/npm"
letsencrypt_dir: "/srv/npm/certs"