Changeset 513


Ignore:
Timestamp:
Jan 20, 2010, 12:23:38 AM (14 years ago)
Author:
sebas
Message:

alineacion + config tftp + debug logy pxe

Location:
trunk/puppet/modules/puppet-dnsmasq
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/puppet/modules/puppet-dnsmasq/README

    r511 r513  
    33
    44dnsmasq::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'
    910}
    1011
  • trunk/puppet/modules/puppet-dnsmasq/manifests/init.pp

    r512 r513  
    11class dnsmasq {
    2   package { "dnsmasq":
    3     ensure => installed,
    4   }
     2    package { "dnsmasq":
     3        ensure => installed,
     4    }
    55}
    66
    77define 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'
    1318) {
    1419
    15   include dnsmasq
     20    include dnsmasq
    1621 
    1722    file { "/etc/dnsmasq.d/my.dnsmasq.conf":
  • trunk/puppet/modules/puppet-dnsmasq/templates/my.dnsmasq.conf.erb

    r512 r513  
    11#
    2 # dnsmasq dhcpd configuration
     2# dnsmasq configuration
    33#
     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.
     11dhcp-range=<%= dhcp_range %>
     12<% end -%>
     13
    414<% 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.
    519dhcp-authoritative
    620<% end -%>
    721
    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.
     25dhcp-option=3,<%= dhcp_gw %>
    1026<% end -%>
    1127
    12 <% if dhcp_option != 'absent' -%>
    13 dhcp-option=<%= dhcp_option %>
     28<% if dhcp_nameservers != 'absent' -%>
     29server=<%= dhcp_nameservers %>
    1430<% end -%>
    1531
     
    4157<% end -%>
    4258
     59<% if dhcp_boot != 'absent' -%>
     60# The file sent to the tftp client, followed by the
     61# tftp servername and ip
     62dhcp-boot=<%= dhcp_boot %>
     63<% end -%>
    4364
     65<% if tftp_root != 'absent' -%>
     66# Set the relative root directory for files availble via TFTP.
     67tftp-root=<%= tftp_root %>
     68<% end -%>
    4469
     70<% if log_queries != 'absent' -%>
     71# For debugging purposes, log each DNS query as it passes through
     72# dnsmasq.
     73log-queries
     74<% end -%>
     75
     76<% if log_dhcp != 'absent' -%>
     77# Log lots of extra information about DHCP transactions.
     78log-dhcp
     79<% end -%>
Note: See TracChangeset for help on using the changeset viewer.