Add Gemfile and puppet 4 checks

In anticipation of puppet 4, start trying to deal with puppet 4 things
that can be helpfully predicted by puppet lint plugins. Also fix lint
errors caught by the puppet-lint-empty_string-check gem and arrow
alignment errors now caught by the newer puppet-lint gem.

Change-Id: I20f0be5d20ad76ba51036089ef50675822d3b4c1
This commit is contained in:
Colleen Murphy 2015-08-13 16:50:59 -07:00
parent 2ac38b2256
commit 1e7977e33c
7 changed files with 41 additions and 9 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
Gemfile.lock
.bundled_gems/

30
Gemfile Normal file
View File

@ -0,0 +1,30 @@
source 'https://rubygems.org'
group :development, :test do
gem 'puppetlabs_spec_helper', :require => false
gem 'metadata-json-lint'
# This is nice and all, but let's not worry about it until we've actually
# got puppet 4.x sorted
# gem 'puppet-lint-param-docs'
gem 'puppet-lint-absolute_classname-check'
gem 'puppet-lint-absolute_template_path'
gem 'puppet-lint-trailing_newline-check'
# Puppet 4.x related lint checks
gem 'puppet-lint-unquoted_string-check'
gem 'puppet-lint-empty_string-check'
gem 'puppet-lint-leading_zero-check'
gem 'puppet-lint-variable_contains_upcase'
gem 'puppet-lint-spaceship_operator_without_tag-check'
gem 'puppet-lint-undef_in_function-check'
if puppetversion = ENV['PUPPET_GEM_VERSION']
gem 'puppet', puppetversion, :require => false
else
gem 'puppet', '~> 3.0', :require => false
end
end
# vim:ft=ruby

View File

@ -19,7 +19,7 @@
class redis(
$redis_port = '6379',
$redis_bind = '127.0.0.1',
$redis_password = '',
$redis_password = undef,
$redis_max_memory = '1gb',
$redis_max_memory_policy = 'allkeys-lru',
$version = '2.2.12',
@ -58,9 +58,9 @@ class redis(
}
service { 'redis-server':
ensure => running,
require => Package['redis-server'],
subscribe => File['/etc/redis/redis.conf'],
ensure => running,
require => Package['redis-server'],
subscribe => File['/etc/redis/redis.conf'],
}
}

View File

@ -147,7 +147,7 @@ slave-serve-stale-data yes
# 150k passwords per second against a good box. This means that you should
# use a very strong password otherwise it will be very easy to break.
#
<% if @redis_password != "" %>
<% if @redis_password != nil %>
requirepass <%= @redis_password %>
<% end %>

View File

@ -178,7 +178,7 @@ slave-priority 100
# 150k passwords per second against a good box. This means that you should
# use a very strong password otherwise it will be very easy to break.
#
<% if @redis_password != "" %>
<% if @redis_password != nil %>
requirepass <%= @redis_password %>
<% end %>

View File

@ -255,7 +255,7 @@ slave-priority 100
# 150k passwords per second against a good box. This means that you should
# use a very strong password otherwise it will be very easy to break.
#
<% if @redis_password != "" %>
<% if @redis_password != nil %>
requirepass <%= @redis_password %>
<% end %>

View File

@ -328,7 +328,7 @@ slave-priority 100
# use a very strong password otherwise it will be very easy to break.
#
# requirepass foobared
<% if @redis_password != "" %>
<% if @redis_password != nil %>
requirepass <%= @redis_password %>
<% end %>