homeserver/roles/PyratLabs.k3s/tasks/ensure_stopped.yml
mg 3cc377c1a7 Rolle aktualisiert: k3s (#455)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: #455
2023-02-17 12:00:24 +01:00

20 lines
467 B
YAML

---
- name: Ensure k3s service is stopped
ansible.builtin.systemd:
name: k3s
state: stopped
enabled: "{{ k3s_start_on_boot }}"
when: k3s_non_root is not defined or not k3s_non_root
become: "{{ k3s_become }}"
- name: Ensure k3s service is started
ansible.builtin.systemd:
name: k3s
state: stopped
enabled: "{{ k3s_start_on_boot }}"
scope: user
when:
- k3s_non_root is defined
- k3s_non_root
become: "{{ k3s_become }}"