Defined Type: dhcp::sharednetwork

Defined in:
manifests/sharednetwork.pp

Summary

defines a sharednetwork-segment to wrap several pools together

Overview

Parameters:

  • sharednetwork (String) (defaults to: $title)

    Name of the sharednetwork as used in ‘dhcp::pool` and `dhcp::pool6` defaults to the title of this resource

  • parameters (Optional[Variant[Array[String[1]], String[1]]]) (defaults to: undef)

    optional defaults you can set for the shared-network can be either a single parameter-string, or an array of several parameters



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'manifests/sharednetwork.pp', line 12

define dhcp::sharednetwork (
  String $sharednetwork = $title,
  Optional[Variant[Array[String[1]], String[1]]] $parameters = undef,
) {
  include dhcp::params

  $dhcp_dir = $dhcp::params::dhcp_dir

  concat::fragment {
    "dhcp_sharednetwork_${name}_head":
      target  => "${dhcp_dir}/dhcpd.pools",
      content => template('dhcp/dhcpd.sharednetwork.erb'),
      order   => "10 ${sharednetwork}-09";

    "dhcp_sharednetwork_${name}_foot":
      target  => "${dhcp_dir}/dhcpd.pools",
      content => "}\n",
      order   => "10 ${sharednetwork}-11";
  }
}