--- - name: Build silverbullet compose dirs ansible.builtin.file: state: directory dest: '{{ silverbullet_base }}/{{ item.path }}' with_filetree: '../templates' when: item.state == 'directory' - name: Build silverbullet compose files ansible.builtin.template: src: '{{ item.src }}' dest: '{{ silverbullet_base }}/{{ item.path }}' with_filetree: '../templates' when: item.state == 'file' - name: Deploy silverbullet stack ansible.builtin.command: cmd: "docker stack deploy -c {{ silverbullet_base }}/stacks/docker-compose.yml silverbullet"