Changeset 557
- Timestamp:
- Mar 6, 2010, 7:04:37 PM (14 years ago)
- Location:
- trunk/puppet/modules/puppet-dnsmasq
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/puppet/modules/puppet-dnsmasq/README
r556 r557 7 7 dhcp_gw => '10.11.12.1', 8 8 dhcp_nameservers => '10.11.12.1', 9 read_ethers => 'yes',9 dhcp_script => '/usr/local/sbin/dnsmasq-genhostname.sh', 10 10 domain => 'mon.domaine.exemple.com', 11 11 dhcp_boot => '/ltsp/i386/pxelinux.0,tftphostname,10.11.12.8', -
trunk/puppet/modules/puppet-dnsmasq/manifests/init.pp
r537 r557 10 10 $dhcp_gw = 'absent', 11 11 $dhcp_nameservers = 'absent', 12 $ read_ethers= 'absent',12 $dhcp_script = 'absent', 13 13 $domain = 'absent', 14 14 $dhcp_boot = 'absent', … … 20 20 include dnsmasq 21 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 } 22 file { 23 "/etc/dnsmasq.d/my.dnsmasq.conf": 24 content => template("dnsmasq/my.dnsmasq.conf.erb"), 25 owner => root, 26 group => root, 27 mode => 644, 28 require => Package["dnsmasq"], 29 notify => Service["dnsmasq"]; 30 "/etc/dnsmasq.hostsfile": 31 ensure => exists, 32 owner => root, 33 group => root, 34 mode => 755, 35 require => Package["dnsmasq"]; 36 "/usr/local/sbin/dnsmasq-genhostname.sh": 37 source => "puppet:///dnsmasq/dnsmasq-genhostname.sh" 38 owner => root, 39 group => root, 40 mode => 755, 41 require => File["/etc/dnsmasq.hostsfile"]; 42 } 30 43 31 44 service { "dnsmasq": 32 ensure => running,33 hasrestart => true,34 hasstatus => true,35 require => File["/etc/dnsmasq.d/my.dnsmasq.conf"],45 ensure => running, 46 hasrestart => true, 47 hasstatus => true, 48 require => File["/etc/dnsmasq.d/my.dnsmasq.conf"], 36 49 } 37 50 -
trunk/puppet/modules/puppet-dnsmasq/templates/my.dnsmasq.conf.erb
r536 r557 31 31 <% end -%> 32 32 33 <% if read_ethers!= 'absent' -%>34 # Dnsmasq will read /etc/ethers and act35 # on the ethernet-address/IP pairs found there just as if they had36 # been given as --dhcp-host options. Useful if you keep37 # MAC-address/host mappings there for other purposes.38 read-ethers 33 <% if dhcp_script != 'absent' -%> 34 # Run an executable when a DHCP lease is created or destroyed. 35 # The arguments sent to the script are "add" or "del", 36 # then the MAC address, the IP address and finally the hostname 37 # if there is one. 38 dhcp-script=<%= dhcp_script %> 39 39 <% end -%> 40 40
Note: See TracChangeset
for help on using the changeset viewer.