--- - name: build ocean hosts: all tasks: - name: Bring down Docker Compose services command: docker compose down args: chdir: "{{ item }}" loop: "{{ extra_services }}" - name: Go to the ocean directory command: "chdir={{directory}} git pull origin {{branch}}" register: git_result - name: Build docker image if there were changes docker_image: source: build build: path: "{{directory}}" name: ocean tag: "{{semaphore_vars.task_details.target_version}}" when: git_result.changed - name: Bring down Docker Compose services command: docker compose up -d args: chdir: "{{ item }}" loop: "{{ extra_services }}"