--- ## install whoami container - name: Check upstream status community.docker.docker_container_exec: container: "{{ caddy_container_id }}" command: > curl localhost:2019/id/{{ stack.name }}_upstream/ register: result changed_when: (result.stdout | from_json) != (lookup('template', 'upstream.json.j2') | from_yaml) become: true notify: "update whoami upstream" - name: Deploy whoami to swarm community.general.docker_stack: name: "{{ stack.name }}" state: present prune: yes compose: - "{{ stack.compose }}" when: stack is defined become: true tags: - docker-swarm notify: "update whoami upstream"