GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - msilvey/chef-cookbook-hostname: Chef cookbook to set node's hostname and FQDN.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

102 Commits
102 Commits

Folders and files

NameName
Last commit message
Last commit date
attributes
attributes
 
 
recipes
recipes
 
 
spec
spec
 
 
test/integration
test/integration
 
 
.gitignore
.gitignore
 
 
.kitchen.yml
.kitchen.yml
 
 
.rubocop.yml
.rubocop.yml
 
 
.travis.yml
.travis.yml
 
 
Berksfile
Berksfile
 
 
CHANGELOG.md
CHANGELOG.md
 
 
Gemfile
Gemfile
 
 
Gemfile.lock
Gemfile.lock
 
 
README.md
README.md
 
 
Strainerfile
Strainerfile
 
 
TESTING.md
TESTING.md
 
 
Thorfile
Thorfile
 
 
chefignore
chefignore
 
 
metadata.rb
metadata.rb
 
 

Repository files navigation

hostname cookbook

Build Status Chef 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 to false 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 of set_fqdn attribute, and hostname to its host part (up to first dot).
  • hostname::vmware -- sets hostname automatically using vmtoolsd. You do not need to set node["set_fqdn"].

Author

Author: Maciej Pasternacki [email protected]

About

Chef cookbook to set node's hostname and FQDN.

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.