aboutsummaryrefslogtreecommitdiff
path: root/manifests/shared_network.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/shared_network.pp')
-rw-r--r--manifests/shared_network.pp25
1 files changed, 25 insertions, 0 deletions
diff --git a/manifests/shared_network.pp b/manifests/shared_network.pp
new file mode 100644
index 0000000..9a02a5b
--- /dev/null
+++ b/manifests/shared_network.pp
@@ -0,0 +1,25 @@
+# == Definition: dhcp::shared-network
+# Creates a shared-network
+#
+# Arguments:
+# *$subnets* : subnet list to be included in the shared-network
+#
+# Warnings:
+# - subnets must exists
+# - subnets must have $is_shared set to true (default is false)
+#
+define dhcp::shared-network(
+ $ensure = present,
+ $subnets = []
+) {
+
+ include dhcp::params
+
+ concat::fragment {"shared-${name}":
+ ensure => $ensure,
+ target => "${dhcp::params::config_dir}/dhcpd.conf",
+ content => template('dhcp/shared-network.erb'),
+ require => Dhcp::Subnet[$subnets],
+ }
+
+}