This repository has been archived on 2023-12-26. You can view files and clone it, but cannot push or open issues or pull requests.
shoarma/ansible/roles/syncthing/tasks/main.yml

31 lines
665 B
YAML
Raw Normal View History

2023-05-02 11:44:19 +00:00
- 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