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-keys (9) Versions 1.1

Creates "authorized_keys" in user "~/.ssh" directory from a data bag (encrypted data bag supported)

Policyfile
Berkshelf
Knife
cookbook 'ssh-keys', '= 1.1', :supermarket
cookbook 'ssh-keys', '= 1.1'
knife supermarket install ssh-keys
knife supermarket download ssh-keys
README
Dependencies
Quality 0%

Description

Creates authorized_keys in user ~/.ssh directory from a data bag.

Attributes

Expects node[:ssh_keys] to be an hash containing the user name as key and data bag user name as value.

See attributes/default.rb for additional attributes default values.

Usage

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

{
  "ssh_keys": {
    "root": "user1"
  },
  "run_list": [
    "recipe[ssh-keys]"
  ]
}

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

{
  "ssh_keys": {
    "root": ["user1", "user2"]
  },
  "run_list": [
    "recipe[ssh-keys]"
  ]
}

Use knife to create a data bag for users:

knife data bag create users

User data bag example (compatible with Chef users cookbook):

knife data bag users user1
{
  "id": "user1",
  "ssh_keys": "ssh-rsa AAAAB3Nz...yhCw== user1"
}

knife data bag users user2
{
  "id": "user2",
  "ssh_keys": "ssh-rsa AAAAB3Nz...5D8F== user2"
}

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

foreflight_build_agent Applicable Versions

Foodcritic Metric
            

1.1 failed this metric

FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e319a4cfb444bdcefbc23454/ssh-keys/attributes/default.rb:1
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e319a4cfb444bdcefbc23454/ssh-keys/attributes/default.rb:2
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e319a4cfb444bdcefbc23454/ssh-keys/recipes/default.rb:1
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e319a4cfb444bdcefbc23454/ssh-keys/recipes/default.rb:2
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e319a4cfb444bdcefbc23454/ssh-keys/recipes/default.rb:17
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e319a4cfb444bdcefbc23454/ssh-keys/recipes/default.rb:31
FC019: Access node attributes in a consistent manner: /tmp/cook/e319a4cfb444bdcefbc23454/ssh-keys/recipes/default.rb:7
FC031: Cookbook without metadata file: /tmp/cook/e319a4cfb444bdcefbc23454/ssh-keys/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/e319a4cfb444bdcefbc23454/ssh-keys/metadata.rb:1