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

Allow generating SSH keys for users #43

Merged
merged 3 commits into from
Mar 26, 2019
Merged

Allow generating SSH keys for users #43

merged 3 commits into from
Mar 26, 2019

Conversation

smortex
Copy link
Member

@smortex smortex commented Mar 25, 2019

The ssh::keygen defined type allows to generate keys for the root user. At $WORK, we extended the module to allow generating keys for random users, and think this could be upstreamed.

I included some minor refactoring we did internally to this PR. Let me know if you do not like these enhancements and I'll update accordingly.

smortex added 3 commits March 22, 2019 11:26
Comparing values to 0 or empty string can be simplified by making the
parameters optional and defaulting their values to undef.  undef
evaluates to false, making conditionals more straightforward.
When no passphrase is provided, just don't pass it to ssh-keygen(1).
While here, add a test to check when a passphrase is passed.
@zachfi zachfi merged commit a45ca5b into opus-codium:master Mar 26, 2019
@zachfi
Copy link
Collaborator

zachfi commented Mar 26, 2019

This looks good. Thanks for the PR!

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