role for installing k3s
This commit is contained in:
15
ansible-5/roles/k3s/tasks/main.yml
Normal file
15
ansible-5/roles/k3s/tasks/main.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
# Main task file for k3s role
|
||||
|
||||
- name: check for existing config
|
||||
stat:
|
||||
path: /etc/systemd/system/k3s.service
|
||||
register: k3s_service
|
||||
|
||||
- include_tasks: install.yml
|
||||
when: not k3s_service.stat.exists
|
||||
|
||||
- name: Start service k3s, if not started
|
||||
ansible.builtin.service:
|
||||
name: k3s
|
||||
state: started
|
||||
Reference in New Issue
Block a user