43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
- name: Set up k3s on dev node
|
|
hosts: dev
|
|
become: true
|
|
tasks:
|
|
- name: Install curl
|
|
ansible.builtin.apt:
|
|
name: curl
|
|
state: present
|
|
when: ansible_os_family == "Debian"
|
|
|
|
- name: Download k3s install script
|
|
ansible.builtin.get_url:
|
|
url: https://get.k3s.io
|
|
dest: /tmp/k3s_install.sh
|
|
mode: '0755'
|
|
|
|
- name: Run k3s installer
|
|
ansible.builtin.command: /tmp/k3s_install.sh
|
|
args:
|
|
creates: /usr/local/bin/k3s
|
|
|
|
- name: Ensure k3s service is started and enabled
|
|
ansible.builtin.systemd:
|
|
name: k3s
|
|
enabled: true
|
|
state: started
|
|
|
|
- name: Install Python Kubernetes client
|
|
ansible.builtin.apt:
|
|
name: python3-kubernetes
|
|
state: present
|
|
|
|
- name: Download helm install script
|
|
ansible.builtin.get_url:
|
|
url: https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
|
|
dest: /tmp/get_helm.sh
|
|
mode: '0755'
|
|
|
|
- name: Run helm installer
|
|
ansible.builtin.command: /tmp/get_helm.sh
|
|
args:
|
|
creates: /usr/local/bin/helm
|