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-absolute_classname-check and
puppet-lint-trailing_newline-check gems.

Change-Id: If9e2cd626122c4ff6338a82d87c815ae33578bac
This commit is contained in:
Colleen Murphy 2015-08-13 18:33:47 -07:00
parent fff4cd903c
commit 88e03c0d52
9 changed files with 53 additions and 21 deletions

4
.gitignore vendored
View File

@ -1 +1,3 @@
.vagrant
.vagrant
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

@ -67,15 +67,15 @@ class storyboard::application (
}
# Dependencies
require storyboard::params
require ::storyboard::params
include ::httpd
include ::httpd::mod::wsgi
class { 'python':
class { '::python':
pip => true,
dev => true,
}
include python::install
include ::python::install
if !defined(Package['git']) {
package { 'git':

View File

@ -29,8 +29,8 @@ class storyboard::load_projects (
$source,
) {
include storyboard::params
include storyboard::application
include ::storyboard::params
include ::storyboard::application
$project_file_path = '/var/lib/storyboard/projects.yaml'
@ -42,7 +42,7 @@ class storyboard::load_projects (
source => $source,
replace => true,
require => [
Class['storyboard::application'],
Class['::storyboard::application'],
]
}
@ -53,4 +53,4 @@ class storyboard::load_projects (
subscribe => File[$project_file_path],
require => File[$project_file_path],
}
}
}

View File

@ -25,8 +25,8 @@ class storyboard::load_superusers (
$source,
) {
include storyboard::params
include storyboard::application
include ::storyboard::params
include ::storyboard::application
$superuser_file_path = '/var/lib/storyboard/superusers.yaml'
@ -38,7 +38,7 @@ class storyboard::load_superusers (
source => $source,
replace => true,
require => [
Class['storyboard::application'],
Class['::storyboard::application'],
]
}
@ -49,4 +49,4 @@ class storyboard::load_superusers (
subscribe => File[$superuser_file_path],
require => File[$superuser_file_path],
}
}
}

View File

@ -24,7 +24,7 @@ class storyboard::mysql (
) {
# Install MySQL
include mysql::server
include ::mysql::server
# Add the storyboard database.
mysql::db { $mysql_database:
@ -33,4 +33,4 @@ class storyboard::mysql (
host => 'localhost',
grant => ['all'],
}
}
}

View File

@ -23,9 +23,9 @@ class storyboard::rabbit (
$rabbitmq_user_password
) {
require storyboard::params
require ::storyboard::params
class { 'rabbitmq':
class { '::rabbitmq':
service_manage => true,
delete_guest_user => true,
manage_repos => $storyboard::params::manage_rabbit_repo,

View File

@ -21,7 +21,7 @@ class storyboard::workers (
$use_upstart = false,
) {
include storyboard::params
include ::storyboard::params
$upstart_path = '/etc/init/storyboard-workers.conf'
$sysvinit_path = '/etc/init.d/storyboard-workers'
@ -64,4 +64,4 @@ class storyboard::workers (
Class['::storyboard::application']
]
}
}
}

View File

@ -1,5 +1,5 @@
node 'puppet-storyboard-precise64' {
class { 'storyboard':
class { '::storyboard':
mysql_user_password => 'storyboard',
rabbitmq_user_password => 'storyboard',
hostname => '192.168.99.22',
@ -11,7 +11,7 @@ node 'puppet-storyboard-precise64' {
}
node 'puppet-storyboard-trusty64' {
class { 'storyboard':
class { '::storyboard':
mysql_user_password => 'storyboard',
rabbitmq_user_password => 'storyboard',
hostname => '192.168.99.23',
@ -20,4 +20,4 @@ node 'puppet-storyboard-trusty64' {
'192.168.99.23'
],
}
}
}