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

Skip kickstart Generation if Not Enough Info Provided #74

Closed
jjaswanson4 opened this issue Jan 6, 2023 · 3 comments
Closed

Skip kickstart Generation if Not Enough Info Provided #74

jjaswanson4 opened this issue Jan 6, 2023 · 3 comments
Assignees

Comments

@jjaswanson4
Copy link
Contributor

If certain vars are not defined, generating a kickstart file will fail:

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.errors.AnsibleError: An unhandled exception occurred while templating '{{ lookup('file', '~/.ssh/id_rsa.pub') }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while running the lookup plugin 'file'. Error was a <class 'ansible.errors.AnsibleError'>, original message: could not locate file in lookup: ~/.ssh/id_rsa.pub. could not locate file in lookup: ~/.ssh/id_rsa.pub
fatal: [edge-manager-local]: FAILED! => {"changed": false, "msg": "AnsibleError: An unhandled exception occurred while templating '{{ lookup('file', '~/.ssh/id_rsa.pub') }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while running the lookup plugin 'file'. Error was a <class 'ansible.errors.AnsibleError'>, original message: could not locate file in lookup: ~/.ssh/id_rsa.pub. could not locate file in lookup: ~/.ssh/id_rsa.pub"}

This is not being caught by CI because we "fake" an SSH key there, which is fine, but we should be warning users (or optionally, skipping the task).

@maxamillion
Copy link
Collaborator

@jjaswanson4 would you prefer to skip the task or to omit the entry in the templated kickstart?

I'm good with either, we just need to make sure to document the behavior so the user isn't surprised.

@jjaswanson4
Copy link
Contributor Author

I'd say generating a default kickstart and skipping the omitted info is cleaner, and agreed on documentation.

Maybe we should document and add a debug of "if you don't specify a user/pass or sshkey, you won't be able to log in so...define one of those" ?

@maxamillion
Copy link
Collaborator

Maybe we should document and add a debug of "if you don't specify a user/pass or sshkey, you won't be able to log in so...define one of those" ?

That's technically only true for the edge-type composes, but yes we should make it clear.

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

No branches or pull requests

3 participants