From 482441c9afc827ac0c89101bf6594fe5808d7a4c Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Thu, 20 Nov 2014 10:56:33 +1100 Subject: [PATCH] Add rake "lint" target, fix errors Add the rake "lint" target, and fix resulting minor errors, which were: --- manifests/mod/python.pp - WARNING: class not documented on line 1 manifests/mod/wsgi.pp - WARNING: class not documented on line 1 manifests/vhost.pp - WARNING: variable not enclosed in {} on line 80 manifests/vhost.pp - WARNING: variable not enclosed in {} on line 82 manifests/vhost/redirect.pp - WARNING: variable not enclosed in {} on line 43 manifests/vhost/redirect.pp - WARNING: variable not enclosed in {} on line 45 --- Change-Id: I2213f314d4bf92b4ddf58dbb19a80783380a55ce --- Rakefile | 7 +++++++ manifests/mod/python.pp | 13 +++++++++++++ manifests/mod/wsgi.pp | 13 +++++++++++++ manifests/vhost.pp | 4 ++-- manifests/vhost/redirect.pp | 4 ++-- 5 files changed, 37 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index 3ba1a32..e472112 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,12 @@ require 'rake' +require 'puppet-lint/tasks/puppet-lint' +PuppetLint.configuration.fail_on_warnings = true +PuppetLint.configuration.send('disable_80chars') +PuppetLint.configuration.send('disable_autoloader_layout') +PuppetLint.configuration.send('disable_class_inherits_from_params_class') +PuppetLint.configuration.send('disable_class_parameter_defaults') + task :default => [:spec] desc "Run all module spec tests (Requires rspec-puppet gem)" diff --git a/manifests/mod/python.pp b/manifests/mod/python.pp index fb536e6..3b01360 100644 --- a/manifests/mod/python.pp +++ b/manifests/mod/python.pp @@ -1,3 +1,16 @@ +# Class: apache::mod::python +# +# This class installs Python for Apache +# +# Parameters: +# +# Actions: +# - Install Apache Python package +# +# Requires: +# +# Sample Usage: +# class apache::mod::python { include apache diff --git a/manifests/mod/wsgi.pp b/manifests/mod/wsgi.pp index 28b15ca..81463b9 100644 --- a/manifests/mod/wsgi.pp +++ b/manifests/mod/wsgi.pp @@ -1,3 +1,16 @@ +# Class: apache::mod::wsgi +# +# This class installs wsgi for Apache +# +# Parameters: +# +# Actions: +# - Install Apache wsgi package +# +# Requires: +# +# Sample Usage: +# class apache::mod::wsgi { include apache diff --git a/manifests/vhost.pp b/manifests/vhost.pp index a918907..6ff5859 100644 --- a/manifests/vhost.pp +++ b/manifests/vhost.pp @@ -77,9 +77,9 @@ define apache::vhost( } if $configure_firewall { - if ! defined(Firewall["0100-INPUT ACCEPT $port"]) { + if ! defined(Firewall["0100-INPUT ACCEPT ${port}"]) { @firewall { - "0100-INPUT ACCEPT $port": + "0100-INPUT ACCEPT ${port}": action => 'accept', dport => '$port', proto => 'tcp' diff --git a/manifests/vhost/redirect.pp b/manifests/vhost/redirect.pp index 17c6c65..688d413 100644 --- a/manifests/vhost/redirect.pp +++ b/manifests/vhost/redirect.pp @@ -40,9 +40,9 @@ define apache::vhost::redirect ( notify => Service['httpd'], } - if ! defined(Firewall["0100-INPUT ACCEPT $port"]) { + if ! defined(Firewall["0100-INPUT ACCEPT ${port}"]) { @firewall { - "0100-INPUT ACCEPT $port": + "0100-INPUT ACCEPT ${port}": jump => 'ACCEPT', dport => '$port', proto => 'tcp'