changeset 100:fd3446c3b7b9 puppet-3.6

Set up a recursive localhost-only Bind server (assuming RH's safe and sane default configs)
author IBBoard <dev@ibboard.co.uk>
date Wed, 24 Feb 2016 20:21:44 +0000
parents a0b9a810cf7d
children a48b6011a084
files manifests/templates.pp
diffstat 1 files changed, 24 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/manifests/templates.pp	Tue Feb 16 20:26:00 2016 +0000
+++ b/manifests/templates.pp	Wed Feb 24 20:21:44 2016 +0000
@@ -46,6 +46,7 @@
 	require repos
 	include basenode
 	include private
+	include dnsresolver
 	include ssh::server
 	include vcs::server
 	include vcs::client
@@ -65,6 +66,8 @@
 	}
 }
 
+## Classes to allow facet behaviour using preconfigured setups of classes
+
 class vpsfirewall {
 	resources { "firewall":
 		purge => false,
@@ -129,7 +132,27 @@
 	# put it on a different port to hide from script kiddy noise
 }
 
-## Classes to allow facet behaviour using preconfigured setups of classes
+class dnsresolver {
+	package { 'bind':
+		ensure => present,
+	}
+
+	service { 'named':
+		ensure => running,
+		enable => true,
+	}
+
+	file { '/etc/NetworkManager/conf.d/local-dns-resolver.conf':
+		ensure => present,
+		content => "[main]
+dns=none",
+	}
+
+	file { '/etc/resolv.conf':
+		ensure => present,
+		content => "nameserver 127.0.0.1"
+	}
+}
 
 class repos {
 	yumrepo { 'epel':