Last change
on this file since 557 was
557,
checked in by sebas@…, 14 years ago
|
agregamos la funcionalidad para generar nombre a las maquinas basado en su mac address
|
File size:
1.4 KB
|
Rev | Line | |
---|
[511] | 1 | class dnsmasq { |
---|
[513] | 2 | package { "dnsmasq": |
---|
| 3 | ensure => installed, |
---|
| 4 | } |
---|
[511] | 5 | } |
---|
| 6 | |
---|
| 7 | define dnsmasq::config ( |
---|
[537] | 8 | $dhcp_authoritative = 'absent', |
---|
| 9 | $dhcp_range = 'absent', |
---|
| 10 | $dhcp_gw = 'absent', |
---|
| 11 | $dhcp_nameservers = 'absent', |
---|
[557] | 12 | $dhcp_script = 'absent', |
---|
[537] | 13 | $domain = 'absent', |
---|
| 14 | $dhcp_boot = 'absent', |
---|
| 15 | $tftp_root = 'absent', |
---|
| 16 | $log_queries = 'absent', |
---|
| 17 | $log_dhcp = 'absent' |
---|
[511] | 18 | ) { |
---|
| 19 | |
---|
[513] | 20 | include dnsmasq |
---|
[511] | 21 | |
---|
[557] | 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 | } |
---|
[511] | 43 | |
---|
| 44 | service { "dnsmasq": |
---|
[557] | 45 | ensure => running, |
---|
| 46 | hasrestart => true, |
---|
| 47 | hasstatus => true, |
---|
| 48 | require => File["/etc/dnsmasq.d/my.dnsmasq.conf"], |
---|
[511] | 49 | } |
---|
| 50 | |
---|
| 51 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.