merged with puzzle
[puppet_resolvconf.git] / manifests / init.pp
1 #
2 # resolvconf module
3 #
4 # Copyright 2008, admin(at)immerda.ch
5 # Copyright 2008, Puzzle ITC GmbH
6 # Marcel Härry haerry+puppet(at)puzzle.ch
7 # Simon Josi josi+puppet(at)puzzle.ch
8 #
9 # This program is free software; you can redistribute 
10 # it and/or modify it under the terms of the GNU 
11 # General Public License version 3 as published by 
12 # the Free Software Foundation.
13 #
14
15 # modules_dir { "resolvconf": }
16
17 class resolvconf {
18     $real_resolvconf_domain = $resolvconf_domain ? {
19         ''  => 'glei.ch',
20         default => $resolvconf_domain,
21     }
22     $real_resolvconf_search = $resolvconf_search ? {
23         ''  => 'glei.ch',
24         default => $resolvconf_search,
25     }
26     $real_resolvconf_nameservers = $resolvconf_nameservers ? {
27         ''  => '212.103.67.60:212.103.67.61',
28         default => $resolvconf_nameservers,
29     }
30
31     file { '/etc/resolv.conf':
32         path => '/etc/resolv.conf',
33         owner => root,
34         group => 0,
35         mode => 444,
36         content => template("resolvconf/resolvconf.erb")
37     }
38 }