mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-03 21:40:34 +07:00
Move k3s systemd service from handler to task
This commit is contained in:
parent
dc80ff21f9
commit
e028ca7bc2
@ -1,6 +0,0 @@
|
||||
- name: Restart k3s service
|
||||
systemd:
|
||||
name: k3s
|
||||
daemon_reload: yes
|
||||
enabled: yes
|
||||
state: restarted
|
@ -48,7 +48,15 @@
|
||||
dest: "{{ k3s_config_file }}"
|
||||
- src: k3s.service.j2
|
||||
dest: "{{ k3s_service_file }}"
|
||||
notify: Restart k3s service
|
||||
|
||||
- name: Enable k3s service
|
||||
systemd:
|
||||
name: k3s
|
||||
enabled: yes
|
||||
state: started
|
||||
register: k3s_service
|
||||
until: k3s_service is succeeded
|
||||
retries: 5
|
||||
|
||||
- name: Get Kubernetes config file
|
||||
run_once: yes
|
||||
|
Loading…
Reference in New Issue
Block a user