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

Last change on this file since 513 was 513, checked in by sebas, 14 years ago

alineacion + config tftp + debug logy pxe

File size: 888 bytes
Line 
1class dnsmasq {
2    package { "dnsmasq":
3        ensure => installed,
4    }
5}
6
7define dnsmasq::config (
8    $dhcp_authoritative,
9    $dhcp_range        = 'absent',
10    $dhcp_gw           = 'absent',
11    $dhcp_nameservers  = '10.11.12.1',
12    $read_ethers,
13    $domain            = 'absent',
14    $dhcp_boot         = 'absent',
15    $tftp_root         = 'absent',
16    $log_queries       = 'absent',
17    $log_dhcp          = 'absent'
18) {
19
20    include dnsmasq
21 
22    file { "/etc/dnsmasq.d/my.dnsmasq.conf":
23      content => template("dnsmasq/my.dnsmasq.conf.erb"),
24      owner   => root,
25      group   => root,
26      mode    => 644,
27      require => Package["dnsmasq"],
28      notify  => Service["dnsmasq"],
29    }
30   
31    service { "dnsmasq":
32      ensure => running,
33      hasrestart => true,
34      hasstatus => true,
35      require => File["/etc/dnsmasq.d/my.dnsmasq.conf"],
36    }
37
38}
39   
40 
Note: See TracBrowser for help on using the repository browser.