nickola / chef-ssh-keys Goto Github PK
View Code? Open in Web Editor NEWCookbook "ssh-keys" for Chef, creates "authorized_keys" in user "~/.ssh" directory from a data bag
Cookbook "ssh-keys" for Chef, creates "authorized_keys" in user "~/.ssh" directory from a data bag
eloy@dellta:/srv/repo/chlor-chef-repo$ knife cookbook site install ssh-keys
Installing ssh-keys to /srv/repo/chlor-chef-repo/cookbooks
Checking out the master branch.
Pristine copy branch (chef-vendor-ssh-keys) exists, switching to it.
Downloading ssh-keys from the cookbooks site at version 1.0.0 to /srv/repo/chlor-chef-repo/cookbooks/ssh-keys.tar.gz
Cookbook saved: /srv/repo/chlor-chef-repo/cookbooks/ssh-keys.tar.gz
Removing pre-existing version.
Uncompressing ssh-keys version 1.0.0.
removing downloaded tarball
1 files updated, committing changes
ERROR: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '128'
---- Begin output of git add ssh-keys ----
STDOUT:
STDERR: fatal: Not a git repository: /Users/Nickola/Development/.chef/.git/modules/site-cookbooks/ssh-keys
---- End output of git add ssh-keys ----
Ran git add ssh-keys returned 128
With the current implementation, the keys will be written to chef client logs. Consider using the "sensitive" option of the template resource to suppress logging while writing keys to files. (https://docs.chef.io/resource_template.html)
please push git tags to github... it helps to understand "where i am" from local checkout:
โ git describe --tags
fatal: No names found, cannot describe anything.
If users home directory does not exist, recipe fails to create necessary directory structure and errors out.
I ran into an issue where a users home directory was manually removed. This failed the chef run as the needed directory structure was not present. This presented itself as an issue because of this currently open chef bug. CHEF-2409
Adding recursive true to the directory call will solve this issue and prevent a chef run from failing.
On some servers the file .ssh/authorized_keys is a symlink
As it is a symlink, the recipe fails to update the file. It cannot create a new file .ssh/authorized_keys
Feature request for symlinked files: truncate the file and add the keys.
The metadata.rb file does not have a name attribute; this causes Berskshelf/Riley to crash when uploading.
Even though they are aware of this issue with several cookbooks, I suggest adding the attribute.
Hi,
Can you release your cookbook on the supermarket, since Chef12, the cookbook currently on it could not be run because name isn't present in metadata.rb. I see you already fixed it but not on the supermarket.
Regards,
... since valid keys can begin with "ssh", or "ecdsa", or "ed25519" - and likely more types in the future.
Additionally, why be selective at all - de-duplicating is fair enough, but if the user has additional entries or comments in their existing file, why not simply maintain these and add any new keys if they don't already exist?
All the best,
Stuart
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.