diff options
author | Cédric Jeanneret <cedric.jeanneret@camptocamp.com> | 2010-11-05 08:35:57 +0100 |
---|---|---|
committer | Cédric Jeanneret <cedric.jeanneret@camptocamp.com> | 2010-11-15 14:30:02 +0100 |
commit | 086e580fed2f32d5a63adcc70763ca4c189499b6 (patch) | |
tree | daf22fa651407fc2c5fb1ff64984e4394c258088 /manifests | |
parent | 1b1650c86cc9ca0616d06721b29630747a930d0f (diff) | |
download | puppet-dhcp-086e580fed2f32d5a63adcc70763ca4c189499b6.tar.gz puppet-dhcp-086e580fed2f32d5a63adcc70763ca4c189499b6.tar.bz2 |
(dhcp::params) - class can be used for client and server
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/definitions/dhcp-host.pp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/manifests/definitions/dhcp-host.pp b/manifests/definitions/dhcp-host.pp index 747fa7c..1d7fbbe 100644 --- a/manifests/definitions/dhcp-host.pp +++ b/manifests/definitions/dhcp-host.pp @@ -1,9 +1,20 @@ +/* + += Definition: dhcp::host +Create dhcp configuration for a host + +Arguments: + *$mac*: host MAC address (mandatory) + *$subnet*: subnet in which we want to add this host + *$fixed_address*: host fixed address (if not set, takes $name) + +*/ define dhcp::host($ensure=present,$mac,$subnet,$fixed_address=false) { - include dhcp::variables - common::concatfilepart {$name: + include dhcp::params + common::concatfilepart {"dhcp.host.$name": ensure => $ensure, notify => Service["dhcpd"], - file => "${dhcp::variables::config_dir}/hosts.d/${subnet}.conf", + file => "${dhcp::params::config_dir}/hosts.d/${subnet}.conf", require => Dhcp::Subnet[$subnet], content => template("dhcp/host.conf.erb"), } |