umwandlung in class, und def. von variablen
[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
5 # modules_dir { "resolvconf": }
6
7 class resolvconf {
8     $real_resolvconf_domain = $resolvconf_domain ? {
9         ''  => 'glei.ch',
10         default => $resolvconf_domain,
11     }
12     $real_resolvconf_search = $resolvconf_search ? {
13         ''  => 'glei.ch',
14         default => $resolvconf_search,
15     }
16     $real_resolvconf_nameserver1 = $resolvconf_nameserver1 ? {
17         ''  => '212.103.67.60',
18         default => $resolvconf_nameserver1,
19     }
20     $real_resolvconf_nameserver2 = $resolvconf_nameserver2 ? {
21         ''  => '212.103.72.231',
22         default => $resolvconf_nameserver2,
23     }
24     $real_resolvconf_nameserver3 = $resolvconf_nameserver3 ? {
25         ''  => '192.168.1.104',
26         default => $resolvconf_nameserver3,
27     }
28
29     file { '/etc/resolv.conf':
30         path => '/etc/resolv.conf',
31         owner => root,
32         group => 0,
33         mode => 444,
34         content => template("resolvconf/resolvconf.erb")
35     }
36
37
38 }
39
40
41