2019-03-09 21:54:44 +01:00
|
|
|
---
|
|
|
|
|
2022-09-01 21:39:17 +02:00
|
|
|
- name: Reload systemd
|
2020-12-12 15:27:59 +01:00
|
|
|
ansible.builtin.systemd:
|
2019-10-01 22:31:35 +02:00
|
|
|
daemon_reload: true
|
2019-12-21 18:11:30 +01:00
|
|
|
scope: "{{ k3s_systemd_context }}"
|
2022-01-02 22:52:09 +01:00
|
|
|
become: "{{ k3s_become }}"
|
2019-03-09 21:54:44 +01:00
|
|
|
|
2022-09-01 21:39:17 +02:00
|
|
|
- name: Reload service
|
2022-05-03 20:02:02 +02:00
|
|
|
ansible.builtin.set_fact:
|
|
|
|
k3s_service_reloaded: true
|
|
|
|
become: "{{ k3s_become }}"
|
|
|
|
|
2022-09-01 21:39:17 +02:00
|
|
|
- name: Restart k3s systemd
|
2020-12-12 15:27:59 +01:00
|
|
|
ansible.builtin.systemd:
|
2019-03-09 21:54:44 +01:00
|
|
|
name: k3s
|
|
|
|
state: restarted
|
2019-12-21 18:11:30 +01:00
|
|
|
scope: "{{ k3s_systemd_context }}"
|
2021-01-30 18:23:31 +01:00
|
|
|
enabled: "{{ k3s_start_on_boot }}"
|
2020-11-11 09:41:26 +01:00
|
|
|
retries: 3
|
2020-11-11 15:47:29 +01:00
|
|
|
delay: 3
|
2021-02-28 17:45:38 +01:00
|
|
|
register: k3s_systemd_restart_k3s
|
|
|
|
failed_when:
|
|
|
|
- k3s_systemd_restart_k3s is not success
|
|
|
|
- not ansible_check_mode
|
2022-01-02 22:52:09 +01:00
|
|
|
become: "{{ k3s_become }}"
|
2022-05-03 20:02:02 +02:00
|
|
|
|
2022-09-01 21:39:17 +02:00
|
|
|
- name: Restart k3s service
|
2022-05-03 20:02:02 +02:00
|
|
|
ansible.builtin.service:
|
|
|
|
name: k3s
|
|
|
|
state: restarted
|
|
|
|
enabled: "{{ k3s_start_on_boot }}"
|
|
|
|
retries: 3
|
|
|
|
delay: 3
|
|
|
|
register: k3s_service_restart_k3s
|
|
|
|
failed_when:
|
|
|
|
- k3s_service_restart_k3s is not success
|
|
|
|
- not ansible_check_mode
|
|
|
|
become: "{{ k3s_become }}"
|