- 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