diff options
author | Mathieu Bornoz <mathieu.bornoz@camptocamp.com> | 2012-08-02 11:24:52 +0200 |
---|---|---|
committer | Mathieu Bornoz <mathieu.bornoz@camptocamp.com> | 2012-08-02 11:24:52 +0200 |
commit | 109f35f97718bc607db179533461f2805a60a136 (patch) | |
tree | 7ebcbbbda7911c1f60e39c40d7115ab1e8b5696e /manifests/host.pp | |
parent | 536a24852925104df8b9becfcac9d17ac999a5f4 (diff) | |
download | puppet-dhcp-109f35f97718bc607db179533461f2805a60a136.tar.gz puppet-dhcp-109f35f97718bc607db179533461f2805a60a136.tar.bz2 |
lint + cosmetics
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'], } + } |