mirror of
https://github.com/PyratLabs/ansible-role-k3s.git
synced 2024-11-25 12:15:51 +01:00
25 lines
641 B
YAML
25 lines
641 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: true
|
|
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) }}"
|