merged with immerda
[puppet_resolvconf.git] / manifests / init.pp
1 # modules/resolvconf/manifests/init.pp - manage resolvconf stuff
2 # Copyright (C) 2007 admin@immerda.ch
3 # GPLv3
4 # adapted by Puzzle ITC - haerry+puppet(at)puzzle.ch
5
6 # modules_dir { "resolvconf": }
7
8 class resolvconf {
9     $real_resolvconf_domain = $resolvconf_domain ? {
10         ''  => 'rz.puzzle.ch',
11         default => $resolvconf_domain,
12     }
13     $real_resolvconf_search = $resolvconf_search ? {
14         ''  => 'rz.puzzle.ch.ch',
15         default => $resolvconf_search,
16     }
17     $real_resolvconf_nameservers = $resolvconf_nameservers ? {
18         ''  => '195.141.101.81:195.141.101.82',
19         default => $resolvconf_nameservers,
20     }
21
22     file { '/etc/resolv.conf':
23         path => '/etc/resolv.conf',
24         owner => root,
25         group => 0,
26         mode => 444,
27         content => template("resolvconf/resolvconf.erb")
28     }
29 }