class dnsmasq { package { "dnsmasq": ensure => installed, } } define dnsmasq::config ( $dhcp_authoritative = 'absent', $dhcp_range = 'absent', $dhcp_gw = 'absent', $dhcp_nameservers = 'absent', $read_ethers = 'absent', $domain = 'absent', $dhcp_boot = 'absent', $tftp_root = 'absent', $log_queries = 'absent', $log_dhcp = 'absent' ) { include dnsmasq file { "/etc/dnsmasq.d/my.dnsmasq.conf": content => template("dnsmasq/my.dnsmasq.conf.erb"), owner => root, group => root, mode => 644, require => Package["dnsmasq"], notify => Service["dnsmasq"], } service { "dnsmasq": ensure => running, hasrestart => true, hasstatus => true, require => File["/etc/dnsmasq.d/my.dnsmasq.conf"], } }