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 | d8f231f802e967bdf5c30bbee61fab05a7621dc6 (patch) | |
tree | b30a9f20b284d5b44ec46140bb48468bfb3674d2 /manifests/a.pp | |
parent | e9c9acdd15579bcb10ca9509c032819d3f808e53 (diff) | |
download | puppet-bind-d8f231f802e967bdf5c30bbee61fab05a7621dc6.tar.gz puppet-bind-d8f231f802e967bdf5c30bbee61fab05a7621dc6.tar.bz2 |
lint + cosmetics
Diffstat (limited to 'manifests/a.pp')
-rw-r--r-- | manifests/a.pp | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/manifests/a.pp b/manifests/a.pp index 41fdee8..d457413 100644 --- a/manifests/a.pp +++ b/manifests/a.pp @@ -1,34 +1,35 @@ -/* - -= Definition: bind::a -Creates an IPv4 record. - -Arguments: - *$zone*: Bind::Zone name - *$owner*: owner of the Resource Record - *$host*: target of the Resource Record - *$ttl*: Time to Live for the Resource Record. Optional. - *$ptr*: create the corresponding ptr record (default=false) - -*/ -define bind::a($ensure=present, - $zone, - $owner=false, - $host, - $ttl=false, - $ptr=false) { +# = Definition: bind::a +# +# Creates an IPv4 record. +# +# Arguments: +# *$zone*: Bind::Zone name +# *$owner*: owner of the Resource Record +# *$host*: target of the Resource Record +# *$ttl*: Time to Live for the Resource Record. Optional. +# *$ptr*: create the corresponding ptr record (default=false) +# +# +define bind::a( + $zone, + $host, + $ensure = present, + $owner = false, + $ttl = false, + $ptr = false +) { bind::record {$name: - ensure => $ensure, - zone => $zone, - owner => $owner, - host => $host, - ttl => $ttl, + ensure => $ensure, + zone => $zone, + owner => $owner, + host => $host, + ttl => $ttl, record_type => 'A', } if $ptr { - $arpa = inline_template("<%= require 'ipaddr'; IPAddr.new(host).reverse %>") + $arpa = inline_template("<%= require 'ipaddr'; IPAddr.new(host).reverse %>") $arpa_zone = inline_template("<%= require 'ipaddr'; IPAddr.new(host).reverse.split('.')[1..-1].join('.') %>") bind::ptr {"${arpa}.": @@ -38,4 +39,5 @@ define bind::a($ensure=present, ttl => $ttl, } } + } |