2019-03-09 21:54:44 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: Ensure k3s service unit file is present on control plane
|
|
|
|
template:
|
|
|
|
src: k3s.service.j2
|
|
|
|
dest: /etc/systemd/system/k3s.service
|
|
|
|
when: k3s_control_node
|
|
|
|
notify:
|
2019-10-01 22:31:35 +02:00
|
|
|
- reload systemd
|
2019-03-09 21:54:44 +01:00
|
|
|
|
|
|
|
- meta: flush_handlers
|
|
|
|
|
2019-03-10 15:53:52 +01:00
|
|
|
- name: Ensure k3s is symlinked into the installation destinations
|
|
|
|
file:
|
|
|
|
src: "{{ k3s_install_dir }}/k3s-{{ k3s_release_version }}"
|
|
|
|
dest: "{{ k3s_install_dir }}/{{ item }}"
|
|
|
|
state: link
|
|
|
|
notify:
|
|
|
|
- restart k3s
|
|
|
|
loop:
|
|
|
|
- k3s
|
|
|
|
- kubectl
|
|
|
|
- crictl
|
2019-10-26 23:49:48 +02:00
|
|
|
- ctr
|
2019-03-10 15:53:52 +01:00
|
|
|
|
2019-03-09 21:54:44 +01:00
|
|
|
- name: Ensure k3s control plane is started
|
|
|
|
service:
|
|
|
|
name: k3s
|
|
|
|
state: started
|
|
|
|
enabled: true
|
2019-10-26 23:49:48 +02:00
|
|
|
when: k3s_control_node
|