Add a box for Syncthing

This commit is contained in:
Salt 2021-11-20 18:29:31 -06:00
parent ee5f8ffe92
commit 7976630ad7
2 changed files with 42 additions and 0 deletions

View File

@ -20,3 +20,27 @@
backup_s3backup_list_extra: backup_s3backup_list_extra:
- /data - /data
tags: [ backup ] tags: [ backup ]
- hosts: vm-syncthing-1.home.mgmt.desu.ltd
module_defaults:
docker_container:
state: started
restart_policy: unless-stopped
pull: yes
tasks:
- name: assure nfs mount directory
file: path=/data/syncthing/data state=directory mode=0755
tags: [ storage ]
- name: assure nfs mount
mount: path=/data/syncthing/data src=vm-fs-1.home.mgmt.desu.ltd:/nfs/syncthing fstype=nfs4 opts="rsize=10248576,wsize=1048576,soft,timeo=600,retrans=2,_netdev" state=mounted
tags: [ storage ]
- name: include tasks for applications
include_tasks: tasks/{{ item }}
with_items:
- app/syncthing.yml
tags: [ always ]
roles:
- role: backup
vars:
backup_s3backup_list_extra:
- /data/syncthing/config
tags: [ backup ]

View File

@ -0,0 +1,18 @@
# vim:ft=ansible:
- name: docker deploy syncthing
docker_container:
name: syncthing
image: linuxserver/syncthing:latest
env:
PUID: "1000"
PGID: "1000"
TZ: America/Chicago
volumes:
- /data/syncthing/config:/config
- /data/syncthing/data:/data
ports:
- 8384:8384
- 22000:22000/tcp
- 22000:22000/udp
- 21027:21027/udp
tags: [ docker, syncthing ]