Skip to content

Latest commit

 

History

History
89 lines (67 loc) · 2.51 KB

README.md

File metadata and controls

89 lines (67 loc) · 2.51 KB

Ansible Role RKE2

Molecule Test

This is an Ansible role to install and configure rke2.

Include more information about rke2 in this section.

Requirements

These platforms are supported:

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Debian 11
  • EL 8 (Tested on Rocky Linux 8)
  • EL 9 (Tested on Rocky Linux 9)
  • Fedora 40
  • openSUSE Leap 15.5

Role Variables

Variable Default Description
rke2_role_name rke2 Name of role role in collection Rancher
rke2_script_url https://get.rke2.io URL of the RKE2 setup script
rke2_channel v1.24 RKE2 release channel. v1.24 is the latest supported for Rancher
rke2_tls_san ["{{ ansible_domain }}"] List of additional domains to add to the RKE2 server certificate
rke2_type server RKE2 type. Options: [server, agent]
rke2_server_token RKE2 server token to set. Will be generated at runtime if unset.
rke2_auto_cluster true Automatically put all nodes in the current play in a single cluster. Use the first hosts as initial server.
rke2_server_ip If this variable is set, nodes will register to this existing server. Must not be set on the initial host.
rke2_server_ansible_user {{ ansible_user_id }} User to copy the kubeconfig to ~/.kube/config

Dependencies

None

Example Playbook

- name: Use diademiemi.rke2 role
  hosts: "{{ target | default('rke2') }}"
  roles:
    - role: "diademiemi.rke2"
      tags: ['diademiemi', 'rke2', 'setup']    ```

License

MIT

Author Information

  • diademiemi (@diademiemi)

Role Testing

This repository comes with Molecule that run in Podman on the supported platforms. Install Molecule by running

pip3 install -r requirements.txt

Run the tests with

molecule test

These tests are automatically ran by GitHub Actions on push. If the tests are successful, the role is automatically published to Ansible Galaxy.