]> gitweb.fluxo.info Git - puppet-dhcp.git/commitdiff
(dhcp::params) - class can be used for client and server
authorCédric Jeanneret <cedric.jeanneret@camptocamp.com>
Fri, 5 Nov 2010 07:35:57 +0000 (08:35 +0100)
committerCédric Jeanneret <cedric.jeanneret@camptocamp.com>
Mon, 15 Nov 2010 13:30:02 +0000 (14:30 +0100)
manifests/definitions/dhcp-host.pp

index 747fa7c7740f381be6c7803f02525b46e20ec42f..1d7fbbeb9b49b968763c027669b18839cf67b39d 100644 (file)
@@ -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"),
   }