summaryrefslogtreecommitdiff
path: root/playbooks/roles/outbound/tasks/main.yml
blob: 84070d6b4540e0c60ffda46617f2872df66705e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---

- name: Build headscale compose dirs
  ansible.builtin.file:
    state: directory
    dest: '/etc/docker/compose/headscale/{{ item.path }}'
  with_filetree: '../templates'
  when: item.state == 'directory'

- name: Build headscale compose files
  ansible.builtin.template:
    src: '{{ item.src }}'
    dest: '/etc/docker/compose/headscale/{{ item.path }}'
  with_filetree: '../templates'
  when: item.state == 'file'

- name: Daemon-reload and enable headscale
  ansible.builtin.systemd_service:
    state: started
    enabled: true
    daemon_reload: true
    name: docker-compose@headscale

- name: Perform rollout incase daemon already started
  ansible.builtin.shell:
    cmd: /usr/local/bin/docker-rollout rollout -f docker-compose.yml headscale
    chdir: /etc/docker/compose/headscale