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

Make sure we create token environment file if it does not exist already #385

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

albal
Copy link

@albal albal commented Jan 6, 2025

As it currently stands, when the lineinfile tasks run in either agent or server roles it fails if the file does not exist. I have added the create option set to true:

create: yes

You can check the Ansible documentation

albal added 2 commits January 6, 2025 18:19
By default lineinfile won't create a file if it does not exist already

Signed-off-by: Al West <[email protected]>
Do the same as for server

Signed-off-by: Al West <[email protected]>
@dereknola
Copy link
Member

Those files are automatically created by the K3s install script and should always be present when that step is run.
https://github.com/k3s-io/k3s/blob/master/install.sh#L968

This is effectively #368 again. Please check your setup and make sure you are not attempting to install both servers and agents on the same node. What does your ansible inventory look like?

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