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

35 lines
964 B
YAML
Raw Normal View History

- name: Create Syncthing app directory
file:
2023-01-07 18:08:49 +00:00
path: /srv/syncthing
state: directory
- name: Create Syncthing configuration directory
file:
2023-01-07 18:08:49 +00:00
path: /srv/syncthing/config
state: directory
2022-12-01 22:05:11 +00:00
- name: Copy Syncthing private key
copy:
src: "{{ role_path }}/files/key.pem"
2023-01-07 18:08:49 +00:00
dest: /srv/syncthing/config/key.pem
2022-12-01 22:05:11 +00:00
- name: Copy Syncthing certificate
copy:
src: "{{ role_path }}/files/cert.pem"
2023-01-07 18:08:49 +00:00
dest: /srv/syncthing/config/cert.pem
- name: Copy Syncthing configuration
2022-12-20 17:47:51 +00:00
template:
src: "{{ role_path }}/templates/config.xml.j2"
2023-01-07 18:08:49 +00:00
dest: /srv/syncthing/config/config.xml
- name: Create Syncthing data directory
file:
path: /data/syncthing
state: directory
mode: 0777
2022-12-06 21:20:54 +00:00
- name: Copy Docker Compose script
copy:
src: "{{ role_path }}/files/docker-compose.yml"
2023-01-07 18:08:49 +00:00
dest: /srv/syncthing/docker-compose.yml
- name: Start Docker Compose
docker_compose:
2023-01-07 18:08:49 +00:00
project_src: /srv/syncthing
pull: true
remove_orphans: true