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
This commit is contained in:
Ian Wienand 2014-11-20 10:56:33 +11:00
parent 2ab694619b
commit 482441c9af
5 changed files with 37 additions and 4 deletions

View File

@ -1,5 +1,12 @@
require 'rake' 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] task :default => [:spec]
desc "Run all module spec tests (Requires rspec-puppet gem)" desc "Run all module spec tests (Requires rspec-puppet gem)"

View File

@ -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 { class apache::mod::python {
include apache include apache

View File

@ -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 { class apache::mod::wsgi {
include apache include apache

View File

@ -77,9 +77,9 @@ define apache::vhost(
} }
if $configure_firewall { if $configure_firewall {
if ! defined(Firewall["0100-INPUT ACCEPT $port"]) { if ! defined(Firewall["0100-INPUT ACCEPT ${port}"]) {
@firewall { @firewall {
"0100-INPUT ACCEPT $port": "0100-INPUT ACCEPT ${port}":
action => 'accept', action => 'accept',
dport => '$port', dport => '$port',
proto => 'tcp' proto => 'tcp'

View File

@ -40,9 +40,9 @@ define apache::vhost::redirect (
notify => Service['httpd'], notify => Service['httpd'],
} }
if ! defined(Firewall["0100-INPUT ACCEPT $port"]) { if ! defined(Firewall["0100-INPUT ACCEPT ${port}"]) {
@firewall { @firewall {
"0100-INPUT ACCEPT $port": "0100-INPUT ACCEPT ${port}":
jump => 'ACCEPT', jump => 'ACCEPT',
dport => '$port', dport => '$port',
proto => 'tcp' proto => 'tcp'