cookbook 'jn_hosts', '~> 0.0.4'
jn_hosts (2) Versions 0.0.4 Follow0
Sets up LWRP for managing /etc/hosts
cookbook 'jn_hosts', '~> 0.0.4', :supermarket
knife supermarket install jn_hosts
knife supermarket download jn_hosts
Description
Hosts file LWRP
Manages individual entries in /etc/hosts without effecting other entries
Requirements
Platform that can edit files ;)
Attributes
node[:hosts][:config]
- String - (Default: '/etc/hosts')
The Path to the hosts file you want to modify
Resources/Providers
hosts
Actions
-
:create
Add / Create entry in the host file -
:remove
Remove entry from the hosts file
Parameters
-
ip
The IPV4 adress for this entry (defaults to name) -
entries
The list of entries for this ip. -
force
Force the action even reguardless if entries match. I.e. only match ip and force the new requested state -
config_file
The Path to the file to write out too. (default tonode[:hosts][:config]
)
Examples
Create/modify Localhost entries
hosts "127.0.0.2" do
entries %w/testlocal localtest test.localdomain.com/
end
Force remove some entry
hosts "127.1.1.3" do
action :remove
force true
end
See the example.rb recipe for examples
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
0.0.4 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.0.4 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.0.4 failed this metric
FC064: Ensure issues_url is set in metadata: jn_hosts/metadata.rb:1
FC065: Ensure source_url is set in metadata: jn_hosts/metadata.rb:1
FC066: Ensure chef_version is set in metadata: jn_hosts/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: jn_hosts/metadata.rb:1
FC069: Ensure standardized license defined in metadata: jn_hosts/metadata.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: jn_hosts/providers/default.rb:72
FC085: Resource using new_resource.updated_by_last_action to converge resource: jn_hosts/providers/default.rb:90
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.0.4 passed this metric
Testing File Metric
0.0.4 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.0.4 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.0.4 failed this metric
0.0.4 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.0.4 failed this metric
FC064: Ensure issues_url is set in metadata: jn_hosts/metadata.rb:1
FC065: Ensure source_url is set in metadata: jn_hosts/metadata.rb:1
FC066: Ensure chef_version is set in metadata: jn_hosts/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: jn_hosts/metadata.rb:1
FC069: Ensure standardized license defined in metadata: jn_hosts/metadata.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: jn_hosts/providers/default.rb:72
FC085: Resource using new_resource.updated_by_last_action to converge resource: jn_hosts/providers/default.rb:90
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.0.4 passed this metric
Testing File Metric
0.0.4 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.0.4 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.0.4 failed this metric
FC065: Ensure source_url is set in metadata: jn_hosts/metadata.rb:1
FC066: Ensure chef_version is set in metadata: jn_hosts/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: jn_hosts/metadata.rb:1
FC069: Ensure standardized license defined in metadata: jn_hosts/metadata.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: jn_hosts/providers/default.rb:72
FC085: Resource using new_resource.updated_by_last_action to converge resource: jn_hosts/providers/default.rb:90
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.0.4 passed this metric
Testing File Metric
0.0.4 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.0.4 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.0.4 failed this metric
0.0.4 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