mirror of
https://github.com/PyratLabs/ansible-role-k3s.git
synced 2024-11-29 12:55:51 +01:00
27 lines
629 B
YAML
27 lines
629 B
YAML
---
|
|
- name: Prepare
|
|
hosts: node*
|
|
become: true
|
|
tasks:
|
|
- name: Ensure apt cache is updated and iptables is installed
|
|
ansible.builtin.apt:
|
|
name: iptables
|
|
state: present
|
|
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
|