2017-08-28 15:31:54 +00:00
|
|
|
---
|
|
|
|
- name: Create Duplicati Directory
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
with_items:
|
|
|
|
- "{{ duplicati_data_directory }}"
|
|
|
|
|
|
|
|
- name: Dupicati Docker Container
|
|
|
|
docker_container:
|
|
|
|
name: duplicati
|
|
|
|
image: linuxserver/duplicati
|
|
|
|
pull: true
|
|
|
|
ports:
|
2020-01-05 21:47:40 +00:00
|
|
|
- "{{ duplicati_port }}:8200"
|
2017-08-28 15:31:54 +00:00
|
|
|
volumes:
|
|
|
|
- "{{ duplicati_data_directory }}:/config:rw"
|
2021-02-23 00:18:08 +00:00
|
|
|
- "{{ samba_shares_root }}:/source/shares:{{ duplicati_data_permissions }}"
|
2018-04-08 22:29:25 +00:00
|
|
|
- "{{ docker_home }}:/source/docker:ro"
|
2017-08-28 15:31:54 +00:00
|
|
|
- "/etc/timezone:/etc/timezone:ro"
|
2021-02-23 00:18:08 +00:00
|
|
|
env:
|
|
|
|
TZ: "{{ ansible_nas_timezone }}"
|
|
|
|
PUID: "{{ duplicati_user_id }}"
|
|
|
|
PGID: "{{ duplicati_group_id }}"
|
2017-08-28 15:31:54 +00:00
|
|
|
restart_policy: unless-stopped
|
2021-02-23 15:16:29 +00:00
|
|
|
memory: "{{ duplicati_memory }}"
|
2019-04-11 22:03:11 +00:00
|
|
|
labels:
|
|
|
|
traefik.enable: "{{ duplicati_available_externally }}"
|
2021-01-19 17:18:12 +00:00
|
|
|
traefik.http.routers.duplicati.rule: "Host(`{{ duplicati_hostname }}.{{ ansible_nas_domain }}`)"
|
|
|
|
traefik.http.routers.duplicati.tls.certresolver: "letsencrypt"
|
|
|
|
traefik.http.routers.duplicati.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.routers.duplicati.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.services.duplicati.loadbalancer.server.port: "8200"
|