cookbook 'ssh_auth_keys', '~> 0.1.7'
ssh_auth_keys (4) Versions 0.1.7 Follow4
This recipe reads public ssh authorized keys from data bag and appends those in $HOME/.ssh/authorized_keys file
cookbook 'ssh_auth_keys', '~> 0.1.7', :supermarket
knife supermarket install ssh_auth_keys
knife supermarket download ssh_auth_keys
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 bag
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
.....wrapper_cookbook/attributes/default.rb
default['ssh_auth_keys']['root'] = ["user1", "user2", "bipin"]
default["ssh_auth_keys"]['bips'] = ["bipin"]
Platforms
- Centos-6.9
- Centos-7.3
- Centos-7.4
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",.....]
.....wrapper_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
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write your change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- 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.7 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.7 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.7 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 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.7 passed this metric
Testing File Metric
0.1.7 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.7 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
0.1.7 failed this metric
0.1.7 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.7 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 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.7 passed this metric
Testing File Metric
0.1.7 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.7 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
0.1.7 failed this metric
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 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.1.7 passed this metric
Testing File Metric
0.1.7 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.7 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
0.1.7 failed this metric
0.1.7 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