source: trunk/puppet/modules/puppet-dnsmasq/manifests/init.pp @ 561

Last change on this file since 561 was 561, checked in by sebas@…, 14 years ago

agregamos un archivo hosts.dnsmasq para fijar la posibilidad de teners algunos nombre de servicios/maquinas que resulven a ip

File size: 1.6 KB
Line 
1class dnsmasq {
2    package { "dnsmasq":
3        ensure => installed,
4    }
5}
6
7define dnsmasq::config (
8    $dhcp_authoritative = 'absent',
9    $dhcp_range         = 'absent',
10    $dhcp_gw            = 'absent',
11    $dhcp_nameservers   = 'absent',
12    $dhcp_script        = 'absent',
13    $dhcp_hostsfile     = 'absent',
14    $addn_hosts         = 'absent',
15    $domain             = 'absent',
16    $dhcp_boot          = 'absent',
17    $tftp_root          = 'absent',
18    $log_queries        = 'absent',
19    $log_dhcp           = 'absent'
20) {
21
22    include dnsmasq
23 
24    file {
25       "/etc/dnsmasq.d/my.dnsmasq.conf":
26           content => template("dnsmasq/my.dnsmasq.conf.erb"),
27           owner   => root,
28           group   => root,
29           mode    => 644,
30           require => Package["dnsmasq"],
31           notify  => Service["dnsmasq"];
32       "/etc/dnsmasq.hostsfile":
33           ensure  => present,
34           owner   => root,
35           group   => root,
36           mode    => 644,
37           require => Package["dnsmasq"];
38       "/usr/local/sbin/dnsmasq-genhostname.sh":
39           source  => "puppet:///dnsmasq/dnsmasq-genhostname.sh",
40           owner   => root,
41           group   => root,
42           mode    => 755,
43           require => File["/etc/dnsmasq.hostsfile"];
44       "/etc/hosts.dnsmasq":
45           ensure  => present,
46           owner   => root,
47           group   => root,
48           mode    => 644,
49           require => Package["dnsmasq"];
50     }
51   
52    service { "dnsmasq":
53        ensure => running,
54        hasrestart => true,
55        hasstatus => true,
56        require => File["/etc/dnsmasq.d/my.dnsmasq.conf"],
57    }
58
59}
Note: See TracBrowser for help on using the repository browser.