cookbook 'hostname-chef13', '~> 0.4.2'
hostname-chef13 (1) Versions 0.4.2 Follow0
Configures hostname and FQDN
cookbook 'hostname-chef13', '~> 0.4.2', :supermarket
knife supermarket install hostname-chef13
knife supermarket download hostname-chef13
hostname cookbook
Description
Sets hostname and FQDN of the node. The latest code is hosted at
https://github.com/3ofcoins/chef-cookbook-hostname
Important
Setting hostname on FQDN is not (and won't be) supported. Unfortunately, using dots in the hostname can cause
inconsistent results for any system that consumes DNS
and is not allowed by RFC952. If a user
needs additional info in their shell prompt, they can change PS1 in etc/profile
to include the FQDN together with any information they find useful (such as
the customer, the environment, etc).
Attributes
-
node['set_fqdn']
- FQDN to set.
The asterisk character will be replaced with node.name
. This way,
you can add this to base role:
default_attributes :set_fqdn => '*.project-domain.com'
and have node set its FQDN and hostname based on its chef node name
(which is provided on chef-client
first run's command line).
-
node['hostname_cookbook']['hostsfile_ip']
-- IP used in/etc/hosts
to correctly set FQDN (default:127.0.1.1
) -
node['hostname_cookbook']['hostsfile_aliases']
-- list of aliases used in/etc/hosts
for the ip set above (default: [hostname
]) node['hostname_cookbook']['hostsfile_include_hostname_in_aliases']
-- whether to include the hostname
at the end of the aliases list above (default: true)node['hostname_cookbook']['append_hostsfile_ip']
-- Set tofalse
to
prevent an entry for the node's hostname from being appended in/etc/hosts
(default:true
)
Recipes
-
hostname::default
-- will set node's FQDN to value ofset_fqdn
attribute, and hostname to its host part (up to first dot). -
hostname::vmware
-- sets hostname automatically using vmtoolsd. You do not need to setnode["set_fqdn"]
.
Author
Author: Maciej Pasternacki maciej@3ofcoins.net
Dependent cookbooks
hostsfile >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Change History
0.4.2 (2017-05-04)
- #51: Make host file idempotent on RHEL
- #52: Add
append_hostsfile_ip
logic for improved idempotence - #55: Ensure sysctl
kernel.hostname
set correctly on RHEL
0.4.1 (2017-04-24)
- #43: Set unique hosts file entry for hostname
- #44: Make hostname mapping to
127.0.0.1
optional - #59: Updates to resolve deprecations warnings
- #60, #61: various test fixes
0.4.0 (2015-03-16)
- #40: Use file resources with lazy eval and notifies to prevent network restarts from occurring on every chef run (Matt Kasa)
- Add box with Ubuntu 14.04 for kitchen tests
- #27: Update default recipe to reload only the hostname plugin instead of ohai (Jonathan Serafini)
0.3.0 (2014-05-20)
- Fixed (and tested) FreeBSD support
- #17: added support for RedHat & CentOS (Damien Roche, Marta Paciorkowska)
- added instructions on manual testing with reboot (Marta Paciorkowska)
0.2.0
- Refresh and fix tests, add Rubocop style checks (Marta Paciorkowska)
- #16: do not remove existing /etc/hosts entries on 127.0.0.1, use configurable IP for hostname entry we need to have for ourselves (Jean Mertz, Marta Paciorkowska)
0.1.0
- Tests: chefspec, test-kitchen
- Substitute
*
inset_fqdn
withnode.name
to allow fully automatic FQDN setup.
0.0.6
- Clean up backup files from community.opscode.com release
0.0.5
- Added change log
-
metadata.rb
explicitly states cookbook name (Chulki Lee) - New recipe
hostname::vmware
(tily) - Use hostsfile cookbook to manipulate
/etc/hosts
, use 127.0.1.1 instead of trying to figure out own IP (Guilhem Lettron)
0.0.4
- Use attribute levels when setting for Chef 11 compatibility (Alan Wilhelm)
0.0.3
- Syntax fix for compatibility with Ruby 1.9.2
0.0.2 and before
This is prehistory.
Collaborator Number Metric
0.4.2 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.4.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
0.4.2 passed this metric
No Binaries Metric
0.4.2 passed this metric
Testing File Metric
0.4.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
0.4.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 include a tag that matches this cookbook version number
0.4.2 failed this metric
0.4.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
0.4.2 passed this metric
No Binaries Metric
0.4.2 passed this metric
Testing File Metric
0.4.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
0.4.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 include a tag that matches this cookbook version number
0.4.2 passed this metric
0.4.2 passed this metric
Testing File Metric
0.4.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
0.4.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 include a tag that matches this cookbook version number
0.4.2 failed this metric
0.4.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 include a tag that matches this cookbook version number