manage resolv.conf for DHCP hosts
authorAntoine Beaupré <anarcat@koumbit.org>
Fri, 17 Jul 2015 19:40:28 +0000 (15:40 -0400)
committerAntoine Beaupré <anarcat@koumbit.org>
Fri, 17 Jul 2015 19:40:28 +0000 (15:40 -0400)
this uses the resolvconf package from Debian, so may not be portable everywhere

manifests/dhcp.pp [new file with mode: 0644]

diff --git a/manifests/dhcp.pp b/manifests/dhcp.pp
new file mode 100644 (file)
index 0000000..b1de2c4
--- /dev/null
@@ -0,0 +1,12 @@
+class resolvconf::dhcp(
+  $tail,
+)
+{
+  package { 'resolvconf': ensure => installed, }
+  if $tail {
+    file { '/etc/resolvconf/resolv.conf.d/tail':
+      content => $tail,
+      require => Package['resolvconf'],
+    }
+  }
+}