--- - name: ensure headscale docker/compose exist file: path: /etc/docker/compose/headscale state: directory owner: root group: root mode: 0700 - name: copy headscale docker-compose.yml copy: src: ../files/docker-compose.yml dest: /etc/docker/compose/headscale/docker-compose.yml owner: root group: root mode: u=rw,g=r,o=r - name: copy headscale config volume copy: src: ../files/config dest: /etc/docker/compose/headscale/ owner: root group: root mode: u=rw,g=r,o=r - name: ensure headscale data volume exist file: path: /etc/docker/compose/headscale/data state: directory owner: root group: root mode: 0700 - name: ensure headscale users shell: | docker exec headscale headscale user create "{{ item }}" with_items: - "{{ headscale_users }}" - name: daemon-reload and enable headscale ansible.builtin.systemd_service: state: restarted enabled: true name: docker-compose@headscale