Deploy a syncthing on pve-docker

This commit is contained in:
Jake Howard 2026-01-01 21:09:37 +00:00
parent b56f476173
commit f3f57faf41
No known key found for this signature in database
GPG key ID: 57AFB45680EDD477
4 changed files with 33 additions and 0 deletions

View file

@ -78,6 +78,7 @@
- freshrss
- atuin
- karakeep
- syncthing
- hosts: ingress
roles:

View file

@ -0,0 +1,12 @@
services:
syncthing:
image: syncthing/syncthing:latest
restart: unless-stopped
network_mode: host
hostname: "{{ ansible_hostname }}"
environment:
- TZ={{ timezone }}
- PUID={{ docker_user.id }}
- PGID={{ docker_user.id }}
volumes:
- /mnt/tank/files:/var/syncthing

View file

@ -0,0 +1,4 @@
- name: restart syncthing
shell:
chdir: /opt/syncthing
cmd: "{{ docker_update_command }}"

View file

@ -0,0 +1,16 @@
- name: Create install directory
file:
path: /opt/syncthing
state: directory
owner: "{{ docker_user.name }}"
mode: "{{ docker_compose_directory_mask }}"
- name: Install compose file
template:
src: files/docker-compose.yml
dest: /opt/syncthing/docker-compose.yml
mode: "{{ docker_compose_file_mask }}"
owner: "{{ docker_user.name }}"
validate: docker compose -f %s config
notify: restart syncthing