cookbook 'set-hostname', '= 1.0.1', :supermarket
set-hostname (4) Versions 1.0.1 Follow1
Sets the hostname on a node and updates the hosts file.
cookbook 'set-hostname', '= 1.0.1'
knife supermarket install set-hostname
knife supermarket download set-hostname
Set Hostname
This simple cookbook sets the hostname on a given host using the node.name
as the default name, and appending any domain, if provided, for the fully qualified domain name of the host.
It also populates the file /etc/hosts
file.
Attributes
You can set the following attributes:
node.normal['set-hostname']['name'] = 'foo'
node.normal['set-hostname']['domain'] = 'bar.com'
node.normal['set-hostname']['ip'] = '1.2.3.4'
node.normal['set-hostname']['hosts-file'] = '/etc/hosts'
This will result in the hostname set to foo.bar.com
and the IP address in the /etc/hosts
file will be 1.2.3.4
.
Default Attributes
The cookbook only requires that you set the domain portion of the name.
In that case, the actual hostname portion is inferred from the node.name
, and the IP address is taken from node['ipaddress']
.
If you do not provide the domain name, the host is configured without the FQDN.
Contributing
To contribute, please fork the cookbook and submit a pull request.
License
MIT License, full text is in the [LICENSE.md](LICENSE.md) file.
Authors
- Konstantin Gredeskoul (current maintainer)
- Eric Saxby
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
1.0.1 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
1.0.1 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.0.1 passed this metric
No Binaries Metric
1.0.1 passed this metric
Publish Metric
1.0.1 passed this metric
Supported Platforms Metric
1.0.1 passed this metric
Testing File Metric
1.0.1 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.0.1 passed this metric
1.0.1 failed this metric
1.0.1 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.0.1 passed this metric
No Binaries Metric
1.0.1 passed this metric
Publish Metric
1.0.1 passed this metric
Supported Platforms Metric
1.0.1 passed this metric
Testing File Metric
1.0.1 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.0.1 passed this metric
1.0.1 passed this metric
1.0.1 passed this metric
Publish Metric
1.0.1 passed this metric
Supported Platforms Metric
1.0.1 passed this metric
Testing File Metric
1.0.1 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.0.1 passed this metric
1.0.1 passed this metric
1.0.1 passed this metric
Testing File Metric
1.0.1 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.0.1 passed this metric
1.0.1 failed this metric
1.0.1 passed this metric