ansible-role-k3s/handlers/main.yml
Xan Manning 2c12436226 Bugfixes
- Added uninstall task to remove hard-linked files #88
  - Fixed missing become for `systemd` operations tasks. #89
  - Added `k3s_start_on_boot` to control `systemd.enabled`.
2021-01-30 17:23:31 +00:00

24 lines
662 B
YAML

---
- name: reload systemd
ansible.builtin.systemd:
daemon_reload: true
scope: "{{ k3s_systemd_context }}"
become: "{{ k3s_become_for_systemd | ternary(true, false, k3s_become_for_all) }}"
- name: restart k3s
ansible.builtin.systemd:
name: k3s
state: restarted
scope: "{{ k3s_systemd_context }}"
enabled: "{{ k3s_start_on_boot }}"
retries: 3
delay: 3
become: "{{ k3s_become_for_systemd | ternary(true, false, k3s_become_for_all) }}"
- name: restart docker
ansible.builtin.systemd:
name: docker
state: restarted
enabled: true
become: "{{ k3s_become_for_systemd | ternary(true, false, k3s_become_for_all) }}"