cookbook 'netrc', '~> 1.1.2', :supermarket
netrc (8) Versions 1.1.2 Follow0
Installs/configures netrc
cookbook 'netrc', '~> 1.1.2'
knife supermarket install netrc
knife supermarket download netrc
netrc-cookbook
Provides ability to manage netrc files for users with Chef.
Attributes
<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>
Usage
netrc::default
The default recipe will install the netrc gem as well as include
the Chef Vault and Chef Sugar 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": "github.com",
"login": "johnbellone",
"password": "bacon"
}
]
},
"beta-us-east-1": {
"machines": []
}
"prod-us-east-1": {
"machines": []
}
}
LWRP
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 'github.com'
login item['username']
password item['access_token']
end
The bag item for this example would look like:
json
{
"id": "github",
"username": "johnbellone",
"access_token": "bacon"
}
Dependent cookbooks
poise ~> 2.2 |
chef-vault >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
1.1.2 passed this metric
Contributing File Metric
1.1.2 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
1.1.2 failed this metric
FC085: Resource using new_resource.updated_by_last_action to converge resource: netrc/libraries/netrc.rb:29
Run with Foodcritic Version 14.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
1.1.2 passed this metric
Publish Metric
1.1.2 passed this metric
Supported Platforms Metric
1.1.2 failed this metric
netrc should declare what platform(s) it supports.
Testing File Metric
1.1.2 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
1.1.2 passed this metric
1.1.2 passed this metric
1.1.2 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
1.1.2 failed this metric
FC085: Resource using new_resource.updated_by_last_action to converge resource: netrc/libraries/netrc.rb:29
Run with Foodcritic Version 14.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
1.1.2 passed this metric
Publish Metric
1.1.2 passed this metric
Supported Platforms Metric
1.1.2 failed this metric
netrc should declare what platform(s) it supports.
Testing File Metric
1.1.2 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
1.1.2 passed this metric
1.1.2 failed this metric
Run with Foodcritic Version 14.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
1.1.2 passed this metric
Publish Metric
1.1.2 passed this metric
Supported Platforms Metric
1.1.2 failed this metric
netrc should declare what platform(s) it supports.
Testing File Metric
1.1.2 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
1.1.2 passed this metric
1.1.2 passed this metric
1.1.2 failed this metric
netrc should declare what platform(s) it supports.
Testing File Metric
1.1.2 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
1.1.2 passed this metric
1.1.2 failed this metric
1.1.2 passed this metric