rancherfederal / rke2-ansible

RKE2 cluster provisioning via Ansible.
Apache License 2.0
234 stars 129 forks source link

updating reboot logic to minimize the chance of an unnecessary reboot #203

Closed aleiner closed 7 months ago

aleiner commented 7 months ago

Existing code would reboot a server at install time due to sysctl changes. It turns out that a reboot is only necessary if RKE2 is already running.

What type of PR is this?

What this PR does / why we need it:

Updates the reboot logic to check to see if RKE2 is running. If it is, and sysctl updates, reboot the host. Otherwise just restart sysctl.

Which issue(s) this PR fixes:

Fixes #199

Release Notes

NONE