Skip to content

Commit

Permalink
cleanup code to pass puppet-lint and add the 'lint' rake target
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Hoblitt committed Mar 2, 2013
1 parent 19c28c4 commit a56b641
Show file tree
Hide file tree
Showing 13 changed files with 139 additions and 17 deletions.
5 changes: 5 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'

PuppetLint.configuration.send("disable_class_inherits_from_params_class")
PuppetLint.configuration.send("disable_variable_scope")
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", 'tests/**/*.pp']
12 changes: 6 additions & 6 deletions manifests/gmetad.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# -name
# -polling_interval
# -address
#
#
# defaults to:
# [ { name => 'my cluster', address => 'localhost' } ],
#
Expand All @@ -24,15 +24,15 @@
#
#
# $clusters = [
# {
# name => 'test',
# {
# name => 'test',
# address => ['test1.example.org', 'test2.example.org'],
# },
# ]
#
# class{ 'ganglia::gmetad':
# clusters => $clusters,
# gridname => 'my grid',
# clusters => $clusters,
# gridname => 'my grid',
# }
#
#
Expand All @@ -42,7 +42,7 @@
#
# === Copyright
#
# Copyright (C) 2012 Joshua Hoblitt
# Copyright (C) 2012-2013 Joshua Hoblitt
#

class ganglia::gmetad(
Expand Down
17 changes: 15 additions & 2 deletions manifests/gmetad/config.pp
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
# == Class: ganglia::gmetad::config
#
# installs the configuration file for gmetad
#
# === Authors
#
# Joshua Hoblitt <[email protected]>
#
# === Copyright
#
# Copyright (C) 2012-2013 Joshua Hoblitt
#

class ganglia::gmetad::config inherits ganglia::gmetad {

file { $gmetad_service_config:
ensure => present,
owner => 'root',
group => 'root',
mode => '0644',
mode => '0644',
content => template($gmetad_service_erb),
notify => Class["ganglia::gmetad::service"],
notify => Class['ganglia::gmetad::service'],
}
}
13 changes: 13 additions & 0 deletions manifests/gmetad/install.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# == Class: ganglia::gmetad::install
#
# installs the package that provides gmetad
#
# === Authors
#
# Joshua Hoblitt <[email protected]>
#
# === Copyright
#
# Copyright (C) 2012-2013 Joshua Hoblitt
#

class ganglia::gmetad::install inherits ganglia::gmetad {

package { $gmetad_package_name:
Expand Down
13 changes: 13 additions & 0 deletions manifests/gmetad/service.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# == Class: ganglia::gmetad::service
#
# enables the gmetad service
#
# === Authors
#
# Joshua Hoblitt <[email protected]>
#
# === Copyright
#
# Copyright (C) 2012-2013 Joshua Hoblitt
#

class ganglia::gmetad::service inherits ganglia::gmetad {

service { $gmetad_service_name:
Expand Down
10 changes: 5 additions & 5 deletions manifests/gmond.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# -host
# -port
# -ttl
#
#
# defaults to:
# [ { mcast_join => '239.2.11.71', port => 8649, bind => '239.2.11.71' } ]
#
Expand All @@ -39,7 +39,7 @@
# -mcast_join
# -port
# -bind
#
#
# defaults to:
# [ { mcast_join => '239.2.11.71', port => 8649, ttl => 1 } ]
#
Expand Down Expand Up @@ -84,7 +84,7 @@
#
# === Copyright
#
# Copyright (C) 2012 Joshua Hoblitt
# Copyright (C) 2012-2013 Joshua Hoblitt
#

class ganglia::gmond (
Expand All @@ -104,8 +104,8 @@
validate_string($cluster_name)
validate_string($cluster_owner)
validate_string($cluster_latlong)
validate_string($cluster_lurl)
validate_string($cluster_location)
validate_string($cluster_url)
validate_string($host_location)
validate_array($udp_send_channel)
validate_array($udp_recv_channel)
validate_array($tcp_accept_channel)
Expand Down
17 changes: 15 additions & 2 deletions manifests/gmond/config.pp
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
# == Class: ganglia::gmond::config
#
# installs the configuration file for gmond
#
# === Authors
#
# Joshua Hoblitt <[email protected]>
#
# === Copyright
#
# Copyright (C) 2012-2013 Joshua Hoblitt
#

class ganglia::gmond::config {

file { $gmond_service_config:
ensure => present,
owner => 'root',
group => 'root',
mode => '0644',
mode => '0644',
content => template($gmond_service_erb),
notify => Class["ganglia::gmond::service"],
notify => Class['ganglia::gmond::service'],
}
}
13 changes: 13 additions & 0 deletions manifests/gmond/install.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# == Class: ganglia::gmond::install
#
# installs the package that provides gmond
#
# === Authors
#
# Joshua Hoblitt <[email protected]>
#
# === Copyright
#
# Copyright (C) 2012-2013 Joshua Hoblitt
#

class ganglia::gmond::install {

package { $gmond_package_name:
Expand Down
13 changes: 13 additions & 0 deletions manifests/gmond/service.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# == Class: ganglia::gmond::service
#
# enables the gmond service
#
# === Authors
#
# Joshua Hoblitt <[email protected]>
#
# === Copyright
#
# Copyright (C) 2012-2013 Joshua Hoblitt
#

class ganglia::gmond::service {

service { $gmond_service_name:
Expand Down
13 changes: 13 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# == Class: ganglia::params
#
# provides parameters for the ganglia module
#
# === Authors
#
# Joshua Hoblitt <[email protected]>
#
# === Copyright
#
# Copyright (C) 2012-2013 Joshua Hoblitt
#

class ganglia::params {
$gmond_package_name = 'ganglia-gmond'
$gmond_service_name = 'gmond'
Expand Down
2 changes: 1 addition & 1 deletion manifests/web.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#
# === Copyright
#
# Copyright (C) 2012 Joshua Hoblitt
# Copyright (C) 2012-2013 Joshua Hoblitt
#

class ganglia::web(
Expand Down
15 changes: 14 additions & 1 deletion manifests/web/config.pp
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
# == Class: ganglia::web::config
#
# configure the ganglia web front end
#
# === Authors
#
# Joshua Hoblitt <[email protected]>
#
# === Copyright
#
# Copyright (C) 2012-2013 Joshua Hoblitt
#

class ganglia::web::config inherits ganglia::web {

file { $web_php_config:
ensure => present,
owner => 'root',
group => 'root',
mode => '0644',
mode => '0644',
content => template($web_php_erb),
}
}
13 changes: 13 additions & 0 deletions manifests/web/install.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# == Class: ganglia::web::install
#
# installs the package that provides the ganglia web front end
#
# === Authors
#
# Joshua Hoblitt <[email protected]>
#
# === Copyright
#
# Copyright (C) 2012-2013 Joshua Hoblitt
#

class ganglia::web::install inherits ganglia::web {

package { $web_package_name:
Expand Down

0 comments on commit a56b641

Please sign in to comment.