This repository has been archived on 2023-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
max/roles/syncthing/tasks/main.yml
2023-01-07 19:08:49 +01:00

34 lines
964 B
YAML

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