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

Select Status

RSS

ssh_auth_keys (4) Versions 0.1.4

This recipe reads public ssh authorized keys from data bag and appends those in $HOME/.ssh/authorized_keys file

Policyfile
Berkshelf
Knife
cookbook 'ssh_auth_keys', '= 0.1.4', :supermarket
cookbook 'ssh_auth_keys', '= 0.1.4'
knife supermarket install ssh_auth_keys
knife supermarket download ssh_auth_keys
README
Dependencies
Changelog
Quality 17%

ssh_auth_keys Cookbook

Description

This recipe reads public ssh authorized keys from data bag and appends those in $HOME/.ssh/authorized_keys file
It supports encrypted data baf supported

Requirements

Attributes

It Expects node[:ssh_auth_keys] to be a hash containing user name as key and data bag user name as value.

<table>
<tr>
<th>Key</th>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td><tt>[:ssh_auth_keys]</tt></td>
<td>Ruby Hash</td>
<td>Ruby hash specifying user_name => databag_name </td>
</tr>
</table>

You can define hash in wrapper cookbook's default attributes as follows

default['ssh_auth_keys']['user_name'] = ["databag1", "databag2",.....]

Additional attributes can be tweaked see attributes/default.rb for Additional self explanatory attributes

.....weapper_cookbook/attributes/default.rb

default['ssh_auth_keys']['root'] = ["user1", "user2", "bipin"]

default["ssh_auth_keys"]['bips'] = ["bipin"]

Platforms

  • Centos-6.8
  • Centos-7.1
  • Centos-7.2

Chef

  • Chef 12.0 or later

Cookbooks

ssh_auth_keys::default

Usage

You can define hash in wrapper cookbook's default attributes as follows

default['ssh_auth_keys']['user_name'] = ["databag1", "databag2",.....]

.....weapper_cookbook/attributes/default.rb

default['ssh_auth_keys']['root'] = ["user1", "user2", "bipin"]

default["ssh_auth_keys"]['bips'] = ["bipin"]

And just include ssh_auth_keys in your wrapper recipe:

include_recipe "ssh_auth_keys"

Node Configuration and run_list can be defined in json format:

Node configuration example to create authorized_keys for user root from data bag user1 user2 and bipin:

{

"ssh_auth_keys": {

"root": ["user1", "user2", "bipin"]

},

"run_list": [
"recipe[ssh_auth_keys]"
]
}

{

"ssh_auth_keys": {

"root": "user1"

},

"run_list": [

"recipe[ssh_auth_keys]"

]

}

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

License and Authors

Authors: TODO: List authors

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

ssh_auth_keys CHANGELOG

This file is used to list changes made in each version of the ssh_auth_keys cookbook.

0.1.0

  • Bipin Bachhao - Initial release of ssh_auth_keys

Check the Markdown Syntax Guide for help with Markdown.

The Github Flavored Markdown page describes the differences between markdown on github and standard markdown.

Collaborator Number Metric
            

0.1.4 failed this metric

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

Contributing File Metric
            

0.1.4 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
            

0.1.4 failed this metric

FC064: Ensure issues_url is set in metadata: ssh_auth_keys/metadata.rb:1
FC065: Ensure source_url is set in metadata: ssh_auth_keys/metadata.rb:1
FC066: Ensure chef_version is set in metadata: ssh_auth_keys/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: ssh_auth_keys/metadata.rb:1
FC069: Ensure standardized license defined in metadata: ssh_auth_keys/metadata.rb:1
Run with Foodcritic Version 13.1.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.1.4 passed this metric

Testing File Metric
            

0.1.4 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
            

0.1.4 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