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"