Skip to content

Commit

Permalink
Fixed lint errors on record manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
solarkennedy committed Apr 22, 2014
1 parent ba00d09 commit 6bf0dbf
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 4 deletions.
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ PuppetLint.configuration.fail_on_warnings = true

# Forsake support for Puppet 2.6.2 for the benefit of cleaner code.
# http://puppet-lint.com/checks/class_parameter_defaults/
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_class_parameter_defaults')
# http://puppet-lint.com/checks/class_inherits_from_params_class/
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
Expand Down
4 changes: 4 additions & 0 deletions manifests/record.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# == Define dns::record
#
# This is a private class to arbitary dns records.
#
define dns::record (
$zone,
$host,
Expand Down
7 changes: 6 additions & 1 deletion manifests/record/a.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# == Define dns::record::a
#
# Wrapper for dns::record to set an A record, optionally
# also setting a PTR at the same time.
#
define dns::record::a (
$zone,
$data,
Expand All @@ -19,7 +24,7 @@
$reverse_zone = inline_template('<%= @ip.split(".")[0..-2].reverse.join(".") %>.IN-ADDR.ARPA')
$octet = inline_template('<%= @ip.split(".")[-1] %>')

dns::record::ptr { "$octet.${reverse_zone}":
dns::record::ptr { "${octet}.${reverse_zone}":
host => $octet,
zone => $reverse_zone,
data => "${host}.${zone}"
Expand Down
4 changes: 4 additions & 0 deletions manifests/record/aaaa.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# == Define: dns::record::aaaa
#
# Wrapper of dns::record to set AAAA records
#
define dns::record::aaaa (
$zone,
$data,
Expand Down
4 changes: 4 additions & 0 deletions manifests/record/cname.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# == Define dns::record::dname
#
# Wrapper for dns::record to set a CNAME
#
define dns::record::cname (
$zone,
$data,
Expand Down
4 changes: 4 additions & 0 deletions manifests/record/mx.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# == Define: dns::record::mx
#
# Wrapper for dns::record to set an XM record.
#
define dns::record::mx (
$zone,
$data,
Expand Down
7 changes: 6 additions & 1 deletion manifests/record/ptr.pp
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# == Define dns::record::prt
#
# Wrapper for dns::record to set PTRs
#
define dns::record::ptr (
$zone,
$data,
$ttl = '',
$host = $name ) {
$host = $name
) {

$alias = "${host},PTR,${zone}"

Expand Down
9 changes: 7 additions & 2 deletions manifests/record/srv.pp
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# == Define dns::server:srv
#
# Wrapper for dns::zone to set SRV records
#
define dns::record::srv (
$zone,
$service,
$proto = "tcp",
$pri,
$weight,
$port,
$target,
$ttl = '') {
$proto = 'tcp',
$ttl = '',
) {

$alias = "${service}:${proto}@${target}:${port},${pri},${weight},SRV,${zone}"

Expand Down
4 changes: 4 additions & 0 deletions manifests/record/txt.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# == Define dns::record::txt
#
# Wrapper for dns::record for TXT records
#
define dns::record::txt (
$zone,
$data,
Expand Down

0 comments on commit 6bf0dbf

Please sign in to comment.