Adoptable Cookbooks List

List of Adoptable Cookbooks

Supermarket Belongs to the Community


Select Badges

Select Supported Platforms


netrc (8) Versions 0.1.0

Installs/configures netrc

cookbook 'netrc', '= 0.1.0'
cookbook 'netrc', '= 0.1.0', :supermarket
knife supermarket install netrc
knife supermarket download netrc
Quality 0%


Release [Build Status][5] [Code Coverage][6]

Provides ability to manage netrc files for users with Chef.


<table> <tr> <th>Key</th> <th>Type</th> <th>Description</th> <th>Default</th> </tr> <tr> <td><tt>['netrc']['bag_name']</tt></td> <td>String</td> <td>Bag name to find Chef Vault items.</td> <td><tt>netrc</tt></td> </tr> <tr> <td><tt>['netrc']['users']</tt></td> <td>Array</td> <td>Users to install netrc from Chef Vault.</td> <td><tt>[]</tt></td> </tr> </table>



The default recipe will install the [netrc gem][1] as well as include the [Chef Vault][2] and [Chef Sugar][3] cookbooks. If the node['netrc']['users'] attribute has been set it will use the LWRP to create a netrc file for the specified user.

Data Bag

    "id": "jbellone",
    "test": {
        "machines": [
            "host": "",
            "login": "johnbellone",
            "password": "bacon"
    "beta-us-east-1": {
        "machines": []
    "prod-us-east-1": {
        "machines": []


The resource provider can be used on its own if you are storing your secret credentials in a separate data bag. Here's an example of a simple data bag which stores the username and access token for a GitHub user.

item = chef_vault_item('secrets', 'github')
netrc 'jbellone' do
  host ''
  login item['username']
  password item['access_token']

The bag item for this example would look like: json { "id": "github", "username": "johnbellone", "access_token": "bacon" }

Dependent cookbooks

poise >= 0.0.0
chef-vault >= 0.0.0
chef-sugar >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Foodcritic Metric

0.1.0 failed this metric

FC031: Cookbook without metadata file: /tmp/cook/b692055ee9668cb9bb42db3c/netrc/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/b692055ee9668cb9bb42db3c/netrc/metadata.rb:1