47 lines
1.0 KiB
YAML
47 lines
1.0 KiB
YAML
---
|
|
- 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: build headscale config template
|
|
template:
|
|
src: ../templates/config.yml.j2
|
|
dest: /etc/docker/compose/headscale/config.yml
|
|
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: daemon-reload and enable headscale
|
|
ansible.builtin.systemd_service:
|
|
state: restarted
|
|
enabled: true
|
|
name: docker-compose@headscale
|