mirror of
https://github.com/PyratLabs/ansible-role-k3s
synced 2024-12-13 14:30:17 +01:00
24 lines
557 B
YAML
24 lines
557 B
YAML
---
|
|
- name: Prepare
|
|
hosts: node*
|
|
become: true
|
|
tasks:
|
|
- name: Ensure apt cache is updated
|
|
ansible.builtin.apt:
|
|
update_cache: true
|
|
when: ansible_pkg_mgr == 'apt'
|
|
|
|
- name: Ensure install directory and configuration directory exists
|
|
ansible.builtin.file:
|
|
path: "/opt/k3s/{{ item }}"
|
|
state: directory
|
|
mode: 0755
|
|
loop:
|
|
- bin
|
|
- etc
|
|
|
|
- name: Ensure data directory exists
|
|
ansible.builtin.file:
|
|
path: "/var/lib/k3s-io"
|
|
state: directory
|
|
mode: 0755
|