2017-11-21 22:18:35 +00:00
|
|
|
---
|
|
|
|
- name: Create ZNC Directories
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
2021-02-07 23:38:10 +00:00
|
|
|
# mode: 0755
|
2017-11-21 22:18:35 +00:00
|
|
|
with_items:
|
|
|
|
- "{{ znc_data_directory }}"
|
|
|
|
|
2021-02-07 23:38:10 +00:00
|
|
|
- name: Create ZNC Docker Container
|
2017-11-21 22:18:35 +00:00
|
|
|
docker_container:
|
|
|
|
name: znc
|
|
|
|
image: znc
|
|
|
|
pull: true
|
|
|
|
volumes:
|
|
|
|
- "{{ znc_data_directory }}:/znc-data:rw"
|
|
|
|
- "/etc/timezone:/etc/timezone:ro"
|
2021-02-07 23:38:10 +00:00
|
|
|
network_mode: "bridge"
|
2017-11-21 22:18:35 +00:00
|
|
|
ports:
|
2020-01-05 21:47:40 +00:00
|
|
|
- "{{ znc_port }}:6677"
|
2017-11-21 22:18:35 +00:00
|
|
|
env:
|
|
|
|
PUID: "{{ znc_user_id }}"
|
|
|
|
PGID: "{{ znc_group_id }}"
|
|
|
|
restart_policy: unless-stopped
|
2021-02-07 23:38:10 +00:00
|
|
|
memory: "{{ znc_memory }}"
|
2019-04-11 22:03:11 +00:00
|
|
|
labels:
|
|
|
|
traefik.enable: "{{ znc_available_externally }}"
|
2021-02-07 23:38:10 +00:00
|
|
|
traefik.http.routers.znc.rule: "Host(`{{ znc_hostname }}.{{ ansible_nas_domain }}`)"
|
2021-01-19 23:51:59 +00:00
|
|
|
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 }}"
|
2021-02-07 23:38:10 +00:00
|
|
|
traefik.http.services.znc.loadbalancer.server.port: "6677"
|