Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

RSS

codenamephp_ssh_keys (1) Versions 1.0.0

Cookbook to install apache2

Berkshelf
Policyfile
Knife
cookbook 'codenamephp_ssh_keys', '~> 1.0.0'
cookbook 'codenamephp_ssh_keys', '~> 1.0.0', :supermarket
knife supermarket install codenamephp_ssh_keys
knife supermarket download codenamephp_ssh_keys
README
Dependencies
Quality 50%

Chef Cookbook

CI

Usage

Just use this in your wrapper cookbook and use the resources any way you see fit.

Resources

local_copy

The codenamephp_ssh_keys_local_copy resources copies the key pair from a local path to the user .ssh folder and makes sure it has the correct permissions. The resources makes some assumptions:

  • The user the keys will be copied to exists. If the user doesn't exist the resource will error. Use a only_if/not_if guard if necessary.
  • The public key is in the same location as the private key and just has the .pub extension
  • The private key will be copied to ~/.ssh/ with the same file name
  • The public key will aso be copied to ~/.ssh/ and will get the same filename as the private key with the .pub extension

If any of these assumptions differ from what you need make sure to set the appropriate properties.

Actions

  • :installs: Copies both keys (if they exist) to the user .ssh folder

Properties

  • user: The user name the keys will belong to
  • private_key_source: The path of the private key file
  • private_key_target: The path where the private key will be copied to, defaults to ~/.ssh/original_filename
  • public_key_source: The path of the public key file, defaults to private_key_source.pub
  • public_key_target: The path where the public key will be copied to, defaults to private_key_target.pub

Examples

# Minimal properties
codenamephp_ssh_keys_local_copy 'Copy keys' do
  user 'test'
  private_key_source '/var/workspace/id_rsa'
end

# With custom paths
codenamephp_ssh_keys_local_copy 'Copy keys' do
  user 'test'
  private_key_source '/var/workspace/id_rsa'
  private_key_target '/home/test/.not-ssh/id_rsa'
  public_key_source '/var/public/some_key.pub'
  public_key_target '/tmp/not/sure/why.pub'
end

Why?

I like to use VMs as my local workstations I create with Vagrant + Chef. My base workspace folder (containing the chef repo and other common stuff) is mounted to /var/workspace using vagrant. So I use this as a simple way to install the ssh keys without any sophisticated vault solution and still don't have my keys to leave my local system.

Collaborator Number Metric
            

1.0.0 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

1.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

1.0.0 passed this metric

No Binaries Metric
            

1.0.0 passed this metric

Publish Metric
            

1.0.0 passed this metric

Supported Platforms Metric
            

1.0.0 passed this metric

Testing File Metric
            

1.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

1.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number