cookbook 'known_host', '~> 0.1.3'
The known_host cookbook has been deprecated
Author provided reason for deprecation:
The known_host cookbook has been deprecated and is no longer being maintained by its authors. Use of the known_host cookbook is no longer recommended.
You may find that the ssh_known_hosts cookbook is a suitable alternative.
known_host (4) Versions 0.1.3 Follow3
LWRP for adding keys to the ssh_known_hosts file
cookbook 'known_host', '~> 0.1.3', :supermarket
knife supermarket install known_host
knife supermarket download known_host
Chef known_host LWRP
The Chef known_host
LWRP exposes an LWRP for adding hosts and keys to the /etc/ssh_known_hosts
file.
Requirements
An operating system that supports /etc/ssh_known_hosts
Usage
This LWRP is pretty freakin' simple:
known_host 'github.com'
This will append an entry in /etc/ssh_known_hosts
like this:
# github.com SSH-2.0-OpenSSH_5.5p1 Debian-6+squeeze1+github8 github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==
You can optionally specify your own key, if you don't want to use ssh-keyscan
:
known_host 'github.com' do key 'node.example.com ssh-rsa ...' end
LWRP Attributes
<table>
<thead>
<tr>
<th>Attribute</th>
<th>Description</th>
<th>Example</th>
<th>Default</th>
</tr>
</thead>
<tbody>
<tr>
<td>host</td>
<td>the host to add</td>
<td><tt>github.com</tt></td>
<td></td>
</tr>
<tr>
<td>key</td>
<td>(optional) provide your own key</td>
<td><tt>ssh-rsa ...</tt></td>
<td>ssh-keyscan -H #{host}
</td>
</tr>
</tbody>
</table>
License and Authors
- Author:: Seth Vargo (sethvargo@gmail.com)
Copyright 2012, Seth Vargo
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
0.1.3 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.3 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.3 failed this metric
FC064: Ensure issues_url is set in metadata: known_host/metadata.rb:1
FC065: Ensure source_url is set in metadata: known_host/metadata.rb:1
FC066: Ensure chef_version is set in metadata: known_host/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: known_host/metadata.rb:1
FC069: Ensure standardized license defined in metadata: known_host/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: known_host/resources/default.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.3 passed this metric
Testing File Metric
0.1.3 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.3 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.3 failed this metric
0.1.3 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.3 failed this metric
FC064: Ensure issues_url is set in metadata: known_host/metadata.rb:1
FC065: Ensure source_url is set in metadata: known_host/metadata.rb:1
FC066: Ensure chef_version is set in metadata: known_host/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: known_host/metadata.rb:1
FC069: Ensure standardized license defined in metadata: known_host/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: known_host/resources/default.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.3 passed this metric
Testing File Metric
0.1.3 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.3 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.3 failed this metric
FC065: Ensure source_url is set in metadata: known_host/metadata.rb:1
FC066: Ensure chef_version is set in metadata: known_host/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: known_host/metadata.rb:1
FC069: Ensure standardized license defined in metadata: known_host/metadata.rb:1
FC074: LWRP should use DSL to define resource's default action: known_host/resources/default.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.1.3 passed this metric
Testing File Metric
0.1.3 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.3 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.3 failed this metric
0.1.3 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