infra/roles/vpn/tasks/main.yml

47 lines
1.0 KiB
YAML
Raw Normal View History

2024-01-02 15:42:42 -05:00
---
- name: ensure headscale docker/compose exist
2024-01-02 15:42:42 -05:00
file:
path: /etc/docker/compose/headscale
2024-01-02 15:42:42 -05:00
state: directory
owner: root
group: root
mode: 0700
2024-01-02 15:42:42 -05:00
- 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
2024-01-02 15:42:42 -05:00
- name: copy headscale config volume
2024-01-02 15:42:42 -05:00
copy:
src: ../files/config
dest: /etc/docker/compose/headscale/
owner: root
group: root
mode: u=rw,g=r,o=r
2024-01-04 01:40:27 -05:00
- name: build headscale config template
template:
src: ../templates/config.yml.j2
2024-01-04 02:14:29 -05:00
dest: /etc/docker/compose/headscale/config/config.yml
2024-01-04 01:40:27 -05:00
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
2024-01-02 15:42:42 -05:00
2024-01-02 19:05:01 -05:00
- name: daemon-reload and enable headscale
ansible.builtin.systemd_service:
state: restarted
enabled: true
name: docker-compose@headscale