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

Add podman_login_info module #133

Merged
merged 1 commit into from
Oct 26, 2020
Merged

Conversation

clelange
Copy link
Contributor

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 and podman_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.

Copy link
Member

@sshnaidm sshnaidm left a 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.

argument_spec=dict(
executable=dict(type='str', default='podman'),
authfile=dict(type='path'),
registry=dict(type='str')
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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

@sshnaidm sshnaidm added the hacktoberfest-accepted Accepted for Hacktoberfest: https://hacktoberfest.digitalocean.com/hacktoberfest-update label Oct 26, 2020
@clelange
Copy link
Contributor Author

Rebased and squashed into a single commit. Now the registry parameter is mandatory and I also added a test for it.

@sshnaidm
Copy link
Member

@clelange very cool, thanks!

@sshnaidm sshnaidm merged commit 92389ab into containers:master Oct 26, 2020
@clelange clelange deleted the podman_login_info branch October 26, 2020 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Accepted for Hacktoberfest: https://hacktoberfest.digitalocean.com/hacktoberfest-update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants