- name: Create Syncthing app directory
file:
path: "{{ service_dir }}"
state: directory
- name: Create Syncthing configuration directory
path: "{{ service_dir }}/config"
- name: Copy Syncthing private key
copy:
src: "{{ role_path }}/files/key.pem"
dest: "{{ service_dir }}/config/key.pem"
- name: Copy Syncthing certificate
src: "{{ role_path }}/files/cert.pem"
dest: "{{ service_dir }}/config/cert.pem"
- name: Copy Syncthing configuration
template:
src: "{{ role_path }}/templates/config.xml.j2"
dest: "{{ service_dir }}/config/config.xml"
- name: Create Syncthing data directory
path: "{{ data_dir }}"
mode: 0777
- name: Copy Docker Compose script
src: "{{ role_path }}/templates/docker-compose.yml.j2"
dest: "{{ service_dir }}/docker-compose.yml"
- name: Start Docker Compose
docker_compose:
project_src: "{{ service_dir }}"
pull: true
remove_orphans: true