ansible-nas/roles/mylar/tasks/main.yml

35 lines
1.1 KiB
YAML
Raw Normal View History

2020-05-02 23:01:06 +00:00
---
2021-02-05 09:31:32 +00:00
- name: Create Mylar Directories
2020-05-02 23:01:06 +00:00
file:
path: "{{ item }}"
state: directory
2021-02-05 09:31:32 +00:00
# mode: 0755
2020-05-02 23:01:06 +00:00
with_items:
2020-05-12 17:52:03 +00:00
- "{{ mylar_data_directory }}/config"
2020-05-02 23:01:06 +00:00
2021-02-05 09:31:32 +00:00
- name: mylar Docker Container
2020-05-02 23:01:06 +00:00
docker_container:
name: mylar
image: linuxserver/mylar
pull: true
volumes:
- "{{ mylar_comics_directory }}:/comics:rw"
- "{{ mylar_downloads_directory }}:/downloads:rw"
2020-05-12 17:52:49 +00:00
- "{{ mylar_data_directory }}/config:/config:rw"
2021-02-05 09:31:32 +00:00
network_mode: "bridge"
2020-05-02 23:01:06 +00:00
ports:
- "{{ mylar_port_http }}:8090"
env:
TZ: "{{ ansible_nas_timezone }}"
PUID: "{{ mylar_user_id }}"
PGID: "{{ mylar_group_id }}"
restart_policy: unless-stopped
2021-02-05 09:31:32 +00:00
memory: "{{ mylar_memory }}"
2020-05-02 23:01:06 +00:00
labels:
traefik.enable: "{{ mylar_available_externally }}"
2021-02-05 09:31:32 +00:00
traefik.http.routers.mylar.rule: "Host(`{{ mylar_hostname }}.{{ ansible_nas_domain }}`)"
traefik.http.routers.mylar.tls.certresolver: "letsencrypt"
traefik.http.routers.mylar.tls.domains[0].main: "{{ ansible_nas_domain }}"
traefik.http.routers.mylar.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
traefik.http.services.mylar.loadbalancer.server.port: "8090"