-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Role is not re-entrant for HA mode #216
Labels
wontfix
This will not be worked on
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still a problem |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
This role can be run in several modes, including validation (installed, started, stopped, restarted, uninstalled, validated)
If you want to run it first in 'installed' and then 'validated' mode in single playbook, there is a problem with k3s_controller_list variable: on second run it contains duplicate entries and consequently validation fails. That's because Ansible - sadly - doesn't scope the variables properly and they're left behind as-is after a role finishes.
It's not a very common use case, however it would be nice if the role was re-entrant. It's also very easy to achieve - e.g. by setting the
k3s_controller_list
to an empty listjust before it's being appended to in a loop:
ansible-role-k3s/tasks/ensure_pre_configuration.yml
Line 31 in 37fda0a
Issue Type
Controller Environment and Configuration
Role version:
Steps to Reproduce
Expected Result
Actual Result
After adding an extra debug task to the role just before this one, I discovered:
The text was updated successfully, but these errors were encountered: