Merge pull request #421 from PurpleNinja225/mv-znc

move znc to role
This commit is contained in:
David Stephens 2021-02-09 22:17:01 +00:00 committed by GitHub
commit 396ad7e9ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 20 deletions

View file

@ -51,7 +51,6 @@ timemachine_enabled: false
gitlab_enabled: false
# IRC
znc_enabled: false
thelounge_enabled: false
# Finance
@ -315,17 +314,6 @@ youtubedlmaterial_port_http: "8998"
###
openvpn_config_directory: "{{ docker_home }}/openvpn"
###
### ZNC
###
znc_available_externally: "false"
znc_data_directory: "{{ docker_home }}/znc"
znc_user_id: "0"
znc_group_id: "0"
znc_port: "6677"
###
### Stats
###

View file

@ -203,6 +203,11 @@
- watchtower
when: (watchtower_enabled | default(False))
- role: znc
tags:
- znc
when: (znc_enabled | default(False))
tasks:
- import_tasks: tasks/firefly.yml
when: (firefly_enabled | default(False))
@ -224,10 +229,6 @@
when: (glances_enabled | default(False))
tags: glances
- import_tasks: tasks/znc.yml
when: (znc_enabled | default(False))
tags: znc
- import_tasks: tasks/miniflux.yml
when: (miniflux_enabled | default(False))
tags: miniflux

View file

@ -0,0 +1,18 @@
---
# enable or disable the application
znc_enabled: false
znc_available_externally: "false"
# directories
znc_data_directory: "{{ docker_home }}/znc"
# uid / gid
znc_user_id: "0"
znc_group_id: "0"
# network
znc_hostname: "znc"
znc_port: "6677"
# specs
znc_memory: "1g"

View file

@ -3,10 +3,11 @@
file:
path: "{{ item }}"
state: directory
# mode: 0755
with_items:
- "{{ znc_data_directory }}"
- name: ZNC
- name: Create ZNC Docker Container
docker_container:
name: znc
image: znc
@ -20,10 +21,10 @@
PUID: "{{ znc_user_id }}"
PGID: "{{ znc_group_id }}"
restart_policy: unless-stopped
memory: 1g
memory: "{{ znc_memory }}"
labels:
traefik.enable: "{{ znc_available_externally }}"
traefik.http.routers.znc.rule: "Host(`znc.{{ ansible_nas_domain }}`)"
traefik.http.routers.znc.rule: "Host(`{{ znc_hostname }}.{{ ansible_nas_domain }}`)"
traefik.http.routers.znc.tls.certresolver: "letsencrypt"
traefik.http.routers.znc.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.znc.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"