prole/infrastructure/playbooks/k3s_install_single.yml

25 lines
566 B
YAML

---
- name: Install and start k3s on a single host
hosts: k3s_hosts
gather_facts: false
become: true
serial: 1
pre_tasks:
- name: Require a single host target
ansible.builtin.assert:
that:
- ansible_play_hosts_all | length == 1
fail_msg: "This playbook targets one host. Use --limit <host>."
- name: Gather minimal facts
ansible.builtin.setup:
gather_subset:
- min
tasks:
- name: Install and start k3s
ansible.builtin.import_role:
name: k3s
tasks_from: install