--- - name: Check ryot directory exist ansible.builtin.file: path: ryot state: directory - name: Copy template conf ansible.builtin.template: src: "{{ item.src }}" dest: "ryot/{{ item.dest }}" loop: - { src: 'docker-compose.yml.j2', dest: 'docker-compose.yml' } register: ryot_copy_templates_results - name: Update and restart container community.docker.docker_compose_v2: project_src: ryot state: present pull: always restarted: "{{ ryot_copy_templates_results.changed }}" become: true