add syncthing stack
This commit is contained in:
parent
4678724dcf
commit
70b9ec605f
12 changed files with 499 additions and 3 deletions
30
ansible/roles/syncthing/tasks/main.yml
Normal file
30
ansible/roles/syncthing/tasks/main.yml
Normal file
|
@ -0,0 +1,30 @@
|
|||
- 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
|
Reference in a new issue