-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
Add podman_login_info module #133
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pull request! One nit inside, please let me know what you think.
plugins/modules/podman_login_info.py
Outdated
argument_spec=dict( | ||
executable=dict(type='str', default='podman'), | ||
authfile=dict(type='path'), | ||
registry=dict(type='str') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add registry as required argument because podman's "--get-login" expects for it. Although it doesn't fail when it's not specified, but also doesn't print registry, only username. I'm not sure only username without registry would be useful output for user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, makes sense! I'll look into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, also please rebase on master when you submit, thanks
a9f164d
to
d6851d5
Compare
d6851d5
to
5f8fe1c
Compare
Rebased and squashed into a single commit. Now the registry parameter is mandatory and I also added a test for it. |
@clelange very cool, thanks! |
This adds a module to check if one is logged in to a given container registry wrapping the
podman login --get-login
command with all its options.I've also added a few tests, which are possible without an actual log in. The GitHub Actions workflow as well as the playbook are adjusted copies of the
podman_volume_info
equivalent.I'd be willing to also look into creating
podman_login
andpodman_logout
modules as listed in #93 and #94 since they'd be useful for a project of mine.Please let me know if you have any suggestions.
Labelling this PR for hacktoberfest would be appreciated.