From fcb5f40bb9788fb9c91b5b5ce18f8a3933d2c767 Mon Sep 17 00:00:00 2001 From: Alex Frantz Date: Thu, 31 Jul 2025 01:23:57 -0400 Subject: [PATCH] add syncthing --- main.yml | 3 +++ tasks/syncthing.yml | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 tasks/syncthing.yml diff --git a/main.yml b/main.yml index 55a1991..25828d0 100644 --- a/main.yml +++ b/main.yml @@ -70,6 +70,9 @@ - name: Deploy Monitoring Stack import_tasks: tasks/monitoring.yml tags: monitoring_deploy + - name: Deploy Syncthing + import_tasks: tasks/syncthing.yml + tags: syncthing_deploy - hosts: jackson diff --git a/tasks/syncthing.yml b/tasks/syncthing.yml new file mode 100644 index 0000000..1899004 --- /dev/null +++ b/tasks/syncthing.yml @@ -0,0 +1,21 @@ +- name: Create folder structure + file: + path: "{{ item }}" + with_items: + - "{{ data_dir }}/syncthing" + +- name: Deploy Syncthing Docker Container + docker_container: + name: syncthing + image: lscr.io/linuxserver/syncthing:latest + recreate: true + restart_policy: unless-stopped + networks: + - name: homelab + env: + PUID: "{{ PUID }}" + PGID: "{{ PGID }}" + TZ: "{{ TZ }}" + volumes: + - "{{ data_dir }}/syncthing:/config" + - "{{ SYNCTHING_DATA_PATH }}:/data"