add syncthing stack

This commit is contained in:
Pim Kunis 2023-05-02 13:44:19 +02:00
parent 4678724dcf
commit 70b9ec605f
12 changed files with 499 additions and 3 deletions

View file

@ -0,0 +1,30 @@
- name: Create working directory
file:
path: /srv/syncthing
state: directory
- name: Copy config file
template:
src: "{{ role_path }}/config.xml.j2"
dest: /srv/syncthing/config.xml
- name: Copy private key
copy:
src: "{{ role_path }}/key.pem"
dest: /srv/syncthing/key.pem
- name: Copy certificate
copy:
src: "{{ role_path }}/cert.pem"
dest: /srv/syncthing/cert.pem
- name: Copy Docker stack file
template:
src: "{{ role_path }}/docker-stack.yml.j2"
dest: /srv/syncthing/docker-stack.yml
- name: Deploy Docker stack
docker_stack:
name: syncthing
compose:
- /srv/syncthing/docker-stack.yml