lablabs / ansible-role-rke2

Ansible Role to install RKE2 Kubernetes.
https://galaxy.ansible.com/ui/standalone/roles/lablabs/rke2/
MIT License
290 stars 145 forks source link

feature: Validate config before restarting rke2 #188

Open mueller-ma opened 7 months ago

mueller-ma commented 7 months ago

Summary

I had the following invalid ansible-role-rke2 config which lead to a broken /etc/rancher/rke2/config.yaml on the server:

rke2_server_options:
  service-node-port-range: 20000-32767

Maybe the config.yaml can be validated before trying to restart any service?

Issue Type

Feature Idea

mueller-ma commented 6 months ago

@MonolithProjects Would you accept an PR that installs yamllint on the node and uses that to validate /etc/rancher/rke2/config.yaml? It can be made optional to avoid the installation of yamllint.