role(headscale): restart containers conditionally
This commit is contained in:
parent
eb0da91152
commit
ed4bdb0987
@ -114,6 +114,8 @@
|
||||
loop:
|
||||
- crt
|
||||
- key
|
||||
when: caddyfile.changed or caddysystemd.changed
|
||||
register: fetchcrt
|
||||
|
||||
- name: Copy to altcrtpath
|
||||
ansible.builtin.copy:
|
||||
@ -122,6 +124,7 @@
|
||||
loop:
|
||||
- crt
|
||||
- key
|
||||
when: fetchcrt.changed
|
||||
|
||||
- name: Run headscale container
|
||||
containers.podman.podman_container:
|
||||
@ -140,6 +143,7 @@
|
||||
command: headscale serve
|
||||
vars:
|
||||
crtpath: "{{ headscale.altcrtpath }}/{{ headscale.dns.base_domain }}"
|
||||
when: caddyfile.changed or caddysystemd.changed or fetchcrt.changed
|
||||
|
||||
- name: Run headscale-ui container
|
||||
containers.podman.podman_container:
|
||||
@ -149,4 +153,5 @@
|
||||
image: "ghcr.io/gurucomputing/headscale-ui:{{ headscale.ui.version }}"
|
||||
ports: "{{ headscale.ui.ports }}"
|
||||
restart_policy: always
|
||||
when: caddyfile.changed or caddysystemd.changed or fetchcrt.changed
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user