add syncthing stack
This commit is contained in:
parent
679a877a39
commit
77a7b20751
7 changed files with 380 additions and 0 deletions
29
ansible/roles/syncthing/tasks/main.yml
Normal file
29
ansible/roles/syncthing/tasks/main.yml
Normal file
|
@ -0,0 +1,29 @@
|
|||
- name: Create cert.pem config
|
||||
docker_config:
|
||||
name: syncthing_cert
|
||||
data: "{{ lookup('file', '{{ role_path }}/cert.pem') }}"
|
||||
use_ssh_client: true
|
||||
rolling_versions: true
|
||||
register: cert
|
||||
|
||||
- name: Create key.pem config
|
||||
docker_config:
|
||||
name: syncthing_key
|
||||
data: "{{ lookup('file', '{{ role_path }}/key.pem') }}"
|
||||
use_ssh_client: true
|
||||
rolling_versions: true
|
||||
register: key
|
||||
|
||||
- name: Create config.xml config
|
||||
docker_config:
|
||||
name: syncthing_config
|
||||
data: "{{ lookup('template', '{{ role_path }}/config.xml.j2') }}"
|
||||
use_ssh_client: true
|
||||
rolling_versions: true
|
||||
register: config
|
||||
|
||||
- name: Deploy Docker stack
|
||||
docker_stack:
|
||||
name: syncthing
|
||||
compose:
|
||||
- "{{ lookup('template', '{{ role_path }}/docker-stack.yml.j2') | from_yaml }}"
|
Reference in a new issue