Skip to content

cbalfour/cbalfour-etchosts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

etchosts

Table of Contents

  1. Overview
  2. Setup - The basics of getting started with etchosts
  3. Usage - Configuration options and additional functionality

Overview

Manage /etc/hosts.

Module Description

The etchosts module lets you use Puppet to manage /etc/hosts.

Note:

  • Depends on hostname and fqdn facter facts.
  • Only tested in Ubuntu.

Setup

What etchosts affects

  • /etc/hosts

Note: This module will replace your existing /etc/hosts.

Beginning with etchosts

	class { "etchosts": ensure => present }

Usage

	class { "etchosts": 
		ensure => present,
		add_ipv4_localhosts => true,
		add_ipv6_localhosts => true, 
		hosts => { 
			192.168.1.10 => ['fred.example.com'],
			192.168.1.11 => ['barney.example.com'],
		}
		template=> "mymodule/hosts.erb",
	}

Configure with hiera

etchosts::ensure: "present"
etchosts::hosts:
   192.168.10.1: 
      fred.example.com
      fred 
   192.168.10.2:
      barney.example.com

About

Puppet module to manage /etc/hosts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published