-
Notifications
You must be signed in to change notification settings - Fork 23.8k
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
ansible-galaxy crashes with invalid token file #70887
Comments
Files identified in the description: If these files are incorrect, please update the |
Hello, thanks for the report. |
I'd be interested if you could share how looks like the token because I modified my token file to not be yaml and I got not exception, only a standard yaml format error (running ansible development version 2.10rc2)
edit: Ok, with -vvv I get an exception but I think this is expected to trace the code source of the issue. |
need_info |
My token file was just a plain file with only the token, nothing else. |
The error here is not when the file has invalid yaml but rather when the yaml structure is not a dictionary. We expect it to be a yaml as a dict so basically token: token_value When the file is just |
Malformed galaxy_token file creates stacktrace. Fixes: ansible#70887 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Malformed galaxy_token file creates stacktrace. Fixes: ansible#70887 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
Malformed galaxy_token file creates stacktrace. Fixes: ansible#70887 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
resolved_by_pr #70911 |
Malformed galaxy_token file creates stacktrace. Fixes: #70887 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
SUMMARY
I had a galaxy-token file which wasn't valid YAML and thus
ansible-galaxy
when crashing when installing a collection. While it's fine that it's failing, it should provide some details about why it failed.@jborean93
ISSUE TYPE
COMPONENT NAME
ansible-galaxy
ANSIBLE VERSION
OS / ENVIRONMENT
macOS 10.15.5
STEPS TO REPRODUCE
Try to install a module using
ansible-galaxy collection install
with an invalid syntax'd YAML file for your ~/.ansible/galaxy_token`EXPECTED RESULTS
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: