--- - name: Check dolibarr directory exist ansible.builtin.file: path: dolibarr state: directory register: first_install - name: Copy template conf ansible.builtin.template: src: "{{ item.src }}" dest: "dolibarr/{{ item.dest }}" loop: - { src: 'docker-compose.yml', dest: 'docker-compose.yml' } - name: Prepare volume folder ansible.builtin.file: path: "{{ item }}" state: directory loop: - "{{ server.work_dir }}/dolibarr/base/documents" - "{{ server.work_dir }}/dolibarr/base/html" - "{{ server.work_dir }}/dolibarr/db" become: true - name: Update and restart container community.docker.docker_compose_v2: project_src: dolibarr state: present pull: always become: true