Rev | Line | |
---|
[511] | 1 | class dnsmasq { |
---|
[513] | 2 | package { "dnsmasq": |
---|
| 3 | ensure => installed, |
---|
| 4 | } |
---|
[511] | 5 | } |
---|
| 6 | |
---|
| 7 | define dnsmasq::config ( |
---|
[537] | 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' |
---|
[511] | 18 | ) { |
---|
| 19 | |
---|
[513] | 20 | include dnsmasq |
---|
[511] | 21 | |
---|
| 22 | file { "/etc/dnsmasq.d/my.dnsmasq.conf": |
---|
| 23 | content => template("dnsmasq/my.dnsmasq.conf.erb"), |
---|
| 24 | owner => root, |
---|
| 25 | group => root, |
---|
[512] | 26 | mode => 644, |
---|
[511] | 27 | require => Package["dnsmasq"], |
---|
[512] | 28 | notify => Service["dnsmasq"], |
---|
[511] | 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.