Ansible for rke2 install on Alpine contiainers

This commit is contained in:
Sivert V. Sæther
2024-10-23 15:20:56 +02:00
parent 71d5f6846c
commit adbd7bdead
12 changed files with 198 additions and 3 deletions

16
roles/rke2/tasks/main.yml Normal file
View File

@@ -0,0 +1,16 @@
---
- name: Fetch install script
ansible.builtin.get_url:
url: https://get.rke2.io
dest: /usr/local/bin/install-rke2.sh
mode: 755
- name: Run install script
ansible.builtin.raw: INSTALL_RKE2_SKIP_RELOAD=1 install-rke2.sh
register: install_rke2
changed_when: install_rke2.rc == 0
- name: Remove install script
ansible.builtin.file:
path: /usr/local/bin/install-rke2.sh
state: absent