2021-01-22 21:23:51 +00:00
|
|
|
---
|
|
|
|
- name: Create Syncthing Directories
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
with_items:
|
|
|
|
- "{{ syncthing_data_directory }}"
|
|
|
|
|
|
|
|
- name: Syncthing Docker Container
|
|
|
|
docker_container:
|
|
|
|
name: syncthing
|
|
|
|
image: syncthing/syncthing:latest
|
|
|
|
pull: true
|
|
|
|
network_mode: host
|
|
|
|
volumes: "{{ syncthing_volumes }}"
|
|
|
|
restart_policy: unless-stopped
|
2021-02-23 15:16:29 +00:00
|
|
|
memory: "{{ syncthing_memory }}"
|
2021-01-22 21:23:51 +00:00
|
|
|
labels:
|
|
|
|
traefik.enable: "{{ syncthing_available_externally }}"
|
|
|
|
traefik.http.routers.syncthing.rule: "Host(`{{ syncthing_hostname }}.{{ ansible_nas_domain }}`)"
|
|
|
|
traefik.http.routers.syncthing.tls.certresolver: "letsencrypt"
|
|
|
|
traefik.http.routers.syncthing.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.routers.syncthing.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
2021-02-21 19:50:07 +00:00
|
|
|
traefik.http.services.syncthing.loadbalancer.server.port: "8384"
|