aboutsummaryrefslogtreecommitdiff
path: root/manifests/definitions/dhcp-host.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/definitions/dhcp-host.pp')
-rw-r--r--manifests/definitions/dhcp-host.pp10
1 files changed, 10 insertions, 0 deletions
diff --git a/manifests/definitions/dhcp-host.pp b/manifests/definitions/dhcp-host.pp
new file mode 100644
index 0000000..747fa7c
--- /dev/null
+++ b/manifests/definitions/dhcp-host.pp
@@ -0,0 +1,10 @@
+define dhcp::host($ensure=present,$mac,$subnet,$fixed_address=false) {
+ include dhcp::variables
+ common::concatfilepart {$name:
+ ensure => $ensure,
+ notify => Service["dhcpd"],
+ file => "${dhcp::variables::config_dir}/hosts.d/${subnet}.conf",
+ require => Dhcp::Subnet[$subnet],
+ content => template("dhcp/host.conf.erb"),
+ }
+}