Changeset 559


Ignore:
Timestamp:
Mar 6, 2010, 8:03:14 PM (12 years ago)
Author:
sebas@…
Message:

agregamos el archivo para tener el listado de mac address + hostname + ip, esta usado por el script. +doc

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

Legend:

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

    r557 r559  
    88        dhcp_nameservers   => '10.11.12.1',
    99        dhcp_script        => '/usr/local/sbin/dnsmasq-genhostname.sh',
     10        dhcp_hostsfile     => '/etc/dnsmasq.hostsfile',
    1011        domain             => 'mon.domaine.exemple.com',
    1112        dhcp_boot          => '/ltsp/i386/pxelinux.0,tftphostname,10.11.12.8',
     
    2324   PC001d60dec327 This is very useful when installing new hosts with the
    2425   automated Debian preseed method.
    25 
     26 * To assign static ip, once the mac address of the targeted host has
     27   appeared in the /etc/dnsmasq.hostsfile, you can go ahead and change the
     28   hostname and add the ip after hostname in this file.
  • trunk/puppet/modules/puppet-dnsmasq/manifests/init.pp

    r557 r559  
    1111    $dhcp_nameservers   = 'absent',
    1212    $dhcp_script        = 'absent',
     13    $dhcp_hostsfile     = 'absent',
    1314    $domain             = 'absent',
    1415    $dhcp_boot          = 'absent',
     
    2930           notify  => Service["dnsmasq"];
    3031       "/etc/dnsmasq.hostsfile":
    31            ensure  => exists,
     32           ensure  => present,
    3233           owner   => root,
    3334           group   => root,
    34            mode    => 755,
     35           mode    => 644,
    3536           require => Package["dnsmasq"];
    3637       "/usr/local/sbin/dnsmasq-genhostname.sh":
    37            source  => "puppet:///dnsmasq/dnsmasq-genhostname.sh"
     38           source  => "puppet:///dnsmasq/dnsmasq-genhostname.sh",
    3839           owner   => root,
    3940           group   => root,
  • trunk/puppet/modules/puppet-dnsmasq/templates/my.dnsmasq.conf.erb

    r557 r559  
    3737# if there is one.
    3838dhcp-script=<%= dhcp_script %>
     39<% end -%>
     40
     41<% if dhcp_hostsfile != 'absent' -%>
     42# This file is puppet here by puppet and the above script is filling
     43# it with the mac address,<generatedhostname>. This same file is
     44# also used to assign the static ip and hostname to a specific mac
     45# address. Take care editing this file.
     46dhcp_hostsfile=<%= dhcp_hostsfile %>
    3947<% end -%>
    4048
Note: See TracChangeset for help on using the changeset viewer.