diff options
Diffstat (limited to 'manifests/host.pp')
-rw-r--r-- | manifests/host.pp | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/manifests/host.pp b/manifests/host.pp index d946ae9..969ecc4 100644 --- a/manifests/host.pp +++ b/manifests/host.pp @@ -1,20 +1,28 @@ -/* +# = 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 ( + $mac, + $subnet, + $ensure = present, + $fixed_address = false, + $options = false +) { -= 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, $options=false) { include dhcp::params - concat::fragment {"dhcp.host.$name": + + concat::fragment {"dhcp.host.${name}": ensure => $ensure, target => "${dhcp::params::config_dir}/hosts.d/${subnet}.conf", - content => template("dhcp/host.conf.erb"), - notify => Service["dhcpd"], + content => template('dhcp/host.conf.erb'), + notify => Service['dhcpd'], } + } |