Skip to content
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

Prevent multiple tokens in k3s.service.env #364

Merged
merged 2 commits into from
Oct 7, 2024

Conversation

anon-software
Copy link
Contributor

If site.yml playbook is executed multiple times with different tokens, they will all accumulate in k3s.service.env. They won't do any harm because the last one wins, however it is a matter of good housekeeping to delete the old before inserting a new one.

Changes

Linked Issues

If site.yml playbook is executed multiple times with different tokens,
they will all accumulate in k3s.service.env. They won't do any harm
because the last one wins, however it is a matter of good housekeeping
to delete the old before inserting a new one.

Signed-off-by: Marko Vukovic <[email protected]>
@anon-software
Copy link
Contributor Author

This is not ideal. When executed again with the same token, the playbook now deletes and inserts the same line resulting in the task reporting a "change" when in fact everything effectively remained the same. I working on a fix for this this.

If the existing token in the environment file is the same as the token
used for the playbook run, leave it in the file to avoid false changed
status from the task.

Signed-off-by: Marko Vukovic <[email protected]>
@dereknola dereknola merged commit 040d378 into k3s-io:master Oct 7, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants