--- - name: Creates directory structure for uptime_kuma data file: path: /home/{{ uptime_kuma_user }}/uptime_kuma/data state: directory owner: "{{ uptime_kuma_user }}" group: "{{ uptime_kuma_user }}" mode: 0775 - name: copy docker compose to server (from template) template: src: templates/docker-compose.yml.j2 dest: /home/{{ uptime_kuma_user }}/uptime_kuma/docker-compose.yml - name: bring down uptime_kuma docker-compose become_user: "{{ uptime_kuma_user }}" community.docker.docker_compose_v2: project_src: /home/{{ uptime_kuma_user }}/uptime_kuma/ state: absent remove_orphans: true register: __remove_uptime_kuma tags: - bring-down - name: update permissions become: true file: path: /home/{{ uptime_kuma_user }} state: directory recurse: yes owner: "{{ uptime_kuma_user }}" group: "{{ uptime_kuma_user }}" mode: 0775 - name: docker compose up become_user: "{{ uptime_kuma_user }}" community.docker.docker_compose_v2: project_src: /home/{{ uptime_kuma_user }}/uptime_kuma/ state: present register: __uptime_kuma - name: debug docker compose down debug: var: __remove_uptime_kuma tags: bring-down - name: debug docker compose up debug debug: var: __uptime_kuma