Changeset 513
- Timestamp:
- Jan 20, 2010, 12:23:38 AM (14 years ago)
- Location:
- trunk/puppet/modules/puppet-dnsmasq
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/puppet/modules/puppet-dnsmasq/README
r511 r513 3 3 4 4 dnsmasq::config { 'mio': 5 dhcp-authoritative => 'yes', 6 dhcp-range => '10.11.12.150,10.11.12.200,255.255.255.0,2h', 7 dhcp-range => '3,10.11.12.1', 8 read-ethers => 'yes', 5 dhcp_authoritative => 'yes', 6 dhcp_range => '10.11.12.150,10.11.12.200,255.255.255.0,2h', 7 dhcp_gw => '10.11.12.1', 8 read_ethers => 'yes', 9 domain => 'mon.domaine.exemple.com' 9 10 } 10 11 -
trunk/puppet/modules/puppet-dnsmasq/manifests/init.pp
r512 r513 1 1 class dnsmasq { 2 package { "dnsmasq":3 ensure => installed,4 }2 package { "dnsmasq": 3 ensure => installed, 4 } 5 5 } 6 6 7 7 define dnsmasq::config ( 8 $dhcp_authoritative, 9 $dhcp_range = 'absent', 10 $dhcp_option = 'absent', 11 $read_ethers, 12 $domain = 'absent' 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' 13 18 ) { 14 19 15 include dnsmasq20 include dnsmasq 16 21 17 22 file { "/etc/dnsmasq.d/my.dnsmasq.conf": -
trunk/puppet/modules/puppet-dnsmasq/templates/my.dnsmasq.conf.erb
r512 r513 1 1 # 2 # dnsmasq dhcpdconfiguration2 # dnsmasq configuration 3 3 # 4 5 <% if dhcp_range != 'absent' -%> 6 # This to enable the integrated DHCP server, you need 7 # to supply the range of addresses available for lease and optionally 8 # a lease time. If you have more than one network, you will need to 9 # repeat this for each network on which you want to supply DHCP 10 # service. 11 dhcp-range=<%= dhcp_range %> 12 <% end -%> 13 4 14 <% if has_variable?("dhcp_authoritative") -%> 15 # Set the DHCP server to authoritative mode. In this mode it will barge in 16 # and take over the lease for any client which broadcasts on the network, 17 # whether it has a record of the lease or not. This avoids long timeouts 18 # when a machine wakes up on a new network. 5 19 dhcp-authoritative 6 20 <% end -%> 7 21 8 <% if dhcp_range != 'absent' -%> 9 dhcp-range=<%= dhcp_range %> 22 <% if dhcp_gw != 'absent' -%> 23 # Override the default route supplied by dnsmasq, which assumes the 24 # router is the same machine as the one running dnsmasq. 25 dhcp-option=3,<%= dhcp_gw %> 10 26 <% end -%> 11 27 12 <% if dhcp_ option!= 'absent' -%>13 dhcp-option=<%= dhcp_option%>28 <% if dhcp_nameservers != 'absent' -%> 29 server=<%= dhcp_nameservers %> 14 30 <% end -%> 15 31 … … 41 57 <% end -%> 42 58 59 <% if dhcp_boot != 'absent' -%> 60 # The file sent to the tftp client, followed by the 61 # tftp servername and ip 62 dhcp-boot=<%= dhcp_boot %> 63 <% end -%> 43 64 65 <% if tftp_root != 'absent' -%> 66 # Set the relative root directory for files availble via TFTP. 67 tftp-root=<%= tftp_root %> 68 <% end -%> 44 69 70 <% if log_queries != 'absent' -%> 71 # For debugging purposes, log each DNS query as it passes through 72 # dnsmasq. 73 log-queries 74 <% end -%> 75 76 <% if log_dhcp != 'absent' -%> 77 # Log lots of extra information about DHCP transactions. 78 log-dhcp 79 <% end -%>
Note: See TracChangeset
for help on using the changeset viewer.