init syncthing role

This commit is contained in:
2026-01-26 23:12:48 -07:00
parent 5c4fe4f2bd
commit b8b3e6e577
4 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1 @@
syncthing_version: 2.0.13

View File

@@ -0,0 +1,21 @@
- name: Create docker-compose project directory
file:
path: /root/syncthing
state: directory
mode: 0750
owner: root
group: root
- name: Create docker-compose
template:
src: templates/docker-compose.yaml.j2
dest: /root/syncthing/docker-compose.yaml
owner: root
group: root
mode: 0600
- name: Run docker-compose up
command: docker compose up -d --build
args:
chdir: /root/syncthing

View File

@@ -0,0 +1,20 @@
---
version: "3"
services:
syncthing:
image: syncthing/syncthing:{{ syncthing_version }}
container_name: syncthing
hostname: {{ inventory_hostname }}
environment:
- PUID=1000
- PGID=1000
- STGUIADDRESS=
volumes:
- /var/lib/syncthing:/var/syncthing
network_mode: host
restart: unless-stopped
healthcheck:
test: curl -fkLsS -m 2 127.0.0.1:8384/rest/noauth/health | grep -o --color=never OK || exit 1
interval: 1m
timeout: 10s
retries: 3

View File

@@ -5,3 +5,4 @@
- common
- ldap_client
- docker
- syncthing