Invading the RKE2 installer script for some improvements #75
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I took the rke2 installer and adapted it to my system (I use a mac, machines are local VMs), tried to add a few more graceful ways to allow re-running of the script (this is by no means a fully idempotent code and should really be reimplemented in Ansible or something)
note 1: I made a LOT of changes. some of them for style, others for correctness, I also added pre-commit tests, shfmt and shellcheck and lots of changes were whitespaces and style. you can go through the commits one by-one to see how I was fixing the script and sometimes backtracking when I undersstood what I was reading. If you want I can squash it and resubmit.
note 2: I didn't need to install Rancher yet, so step 10 was not tested at all. When I get there I'll create a new PR if needed.
note 3: I am using my local IP ranges of course, if you want I can reset the IP addresses to yours.