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

Last change on this file since 537 was 537, checked in by sebas, 13 years ago

formateo

File size: 914 bytes
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    $read_ethers        = 'absent',
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}
Note: See TracBrowser for help on using the repository browser.