homeserver/roles/xanmanning.k3s/molecule/nodeploy/prepare.yml
mg 135bd53414 k3s - Basics (#423)
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Reviewed-on: #423
2022-11-04 20:58:37 +01:00

27 lines
749 B
YAML

---
- name: Prepare
hosts: all
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: Prepare air-gapped installation
delegate_to: localhost
run_once: true
block:
- name: Ensure files directory exists
ansible.builtin.file:
path: ./files
state: directory
mode: 0750
- name: Ensure k3s is downloaded for air-gap installation
ansible.builtin.get_url:
url: https://github.com/k3s-io/k3s/releases/download/v1.22.5%2Bk3s1/k3s
dest: ./files/k3s
mode: 0755