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
1,011 B
YAML
Raw Normal View History

- name: Create Syncthing app directory
file:
2023-01-07 19:32:42 +00:00
path: "{{ service_dir }}"
state: directory
- name: Create Syncthing configuration directory
file:
2023-01-07 19:32:42 +00:00
path: "{{ service_dir }}/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 19:32:42 +00:00
dest: "{{ service_dir }}/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 19:32:42 +00:00
dest: "{{ service_dir }}/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 19:32:42 +00:00
dest: "{{ service_dir }}/config/config.xml"
- name: Create Syncthing data directory
file:
2023-01-07 19:32:42 +00:00
path: "{{ data_dir }}"
state: directory
mode: 0777
2022-12-06 21:20:54 +00:00
- name: Copy Docker Compose script
2023-01-07 19:32:42 +00:00
template:
src: "{{ role_path }}/templates/docker-compose.yml.j2"
dest: "{{ service_dir }}/docker-compose.yml"
- name: Start Docker Compose
docker_compose:
2023-01-07 19:32:42 +00:00
project_src: "{{ service_dir }}"
pull: true
remove_orphans: true