- name: Create Syncthing app directory
file:
path: /apps/syncthing
state: directory
- name: Create Syncthing configuration directory
path: /apps/syncthing/config
- name: Copy Syncthing private key
copy:
src: "{{ role_path }}/files/key.pem"
dest: /apps/syncthing/config/key.pem
- name: Copy Syncthing certificate
src: "{{ role_path }}/files/cert.pem"
dest: /apps/syncthing/config/cert.pem
- name: Copy Syncthing configuration
src: "{{ role_path }}/files/config.xml"
dest: /apps/syncthing/config/config.xml
- name: Create Syncthing data directory
path: /data/syncthing
mode: 0777
- name: Copy docker compose script
src: "{{ role_path }}/files/docker-compose.yml"
dest: /apps/syncthing/docker-compose.yml
- name: Start Docker Compose
docker_compose:
project_src: /apps/syncthing
pull: true
remove_orphans: true