38 lines
841 B
YAML
38 lines
841 B
YAML
---
|
|
- name: Prepare Fedora k3s nodes
|
|
hosts: all
|
|
become: true
|
|
gather_facts: true
|
|
pre_tasks:
|
|
- name: Require Fedora 44
|
|
ansible.builtin.assert:
|
|
that:
|
|
- ansible_distribution == "Fedora"
|
|
- ansible_distribution_major_version == "44"
|
|
fail_msg: "This playbook supports Fedora 44 only."
|
|
- name: Require one server and at least one agent
|
|
ansible.builtin.assert:
|
|
that:
|
|
- groups['k3s_server'] | length == 1
|
|
- groups['k3s_agent'] | length >= 1
|
|
run_once: true
|
|
roles:
|
|
- common
|
|
|
|
- name: Configure the k3s server
|
|
hosts: k3s_server
|
|
become: true
|
|
roles:
|
|
- k3s_server
|
|
|
|
- name: Configure k3s agents
|
|
hosts: k3s_agent
|
|
become: true
|
|
roles:
|
|
- k3s_agent
|
|
|
|
- name: Validate the cluster
|
|
hosts: k3s_server
|
|
become: true
|
|
roles:
|
|
- validation
|