Skip to content

viniciusteles/puppet-hosts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Manage /etc/hosts file.

Description

This module manages /etc/hosts from a template. You can also use it to add host entries.

Parameters

  • host_ip
  • host_name
  • host_fqdn - the host's fully qualified domain name
  • hosts_entries - a list of hosts entries as shown below

Usage

hosts

Replace /etc/hosts with the template file

include hosts

Replace /etc/hosts with the template file, configured with parameters

class { 'hosts':
    host_ip       => '192.168.170.120',
    host_name     => 'myserver',
    host_fqdn     => 'myserver.mydomain.com',
    hosts_entries => [
      "192.168.170.169 anotherdomain.com",
      "192.168.170.170 exampledomain.com"
    ]
}

Authors

Vinícius Teles

Acknowledgement

Thanks to Dennis Hoppe for several ideas extracted from his own Hosts Puppet module.

License

This Puppet module is released under the MIT license:

About

Puppet module to manage /etc/hosts file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published