mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-13 12:08:53 +00:00
28 lines
1,012 B
YAML
28 lines
1,012 B
YAML
---
|
|
- name: Start Dashy
|
|
block:
|
|
- name: Dashy Docker Container
|
|
docker_container:
|
|
name: "{{ dashy_container_name }}"
|
|
image: lissy93/dashy:latest
|
|
pull: true
|
|
ports:
|
|
- "{{ dashy_port }}:80"
|
|
restart_policy: unless-stopped
|
|
memory: "{{ dashy_memory }}"
|
|
labels:
|
|
traefik.enable: "{{ dashy_available_externally | string }}"
|
|
traefik.http.routers.dashy.rule: "Host(`{{ dashy_hostname }}.{{ ansible_nas_domain }}`)"
|
|
traefik.http.routers.dashy.tls.certresolver: "letsencrypt"
|
|
traefik.http.routers.dashy.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
|
traefik.http.routers.dashy.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
|
traefik.http.services.dashy.loadbalancer.server.port: "80"
|
|
when: dashy_enabled is true
|
|
|
|
- name: Stop Dashy
|
|
block:
|
|
- name: Stop Dashy
|
|
docker_container:
|
|
name: "{{ dashy_container_name }}"
|
|
state: absent
|
|
when: dashy_enabled is false
|