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. This patch also corrects lint errors caught by the puppet-lint-absolute_classname-check gem. We disable the puppet-lint-empty_string-check gem to be corrected by a follow-up patch. We disable the disable_arrow_alignment check in the Rakefile. Previously, the system version of puppet-lint that was being run by 'rake lint' was too old to catch this. When using 'bundle exec rake lint' the gem is new enough to catch this. Whether we want to actually fix these lint errors is a different discussion, so this patch disables it for now. Change-Id: I2b2c8511367b2e97c30b7681125d9063b3e78a86
This commit is contained in:
parent
0e88533d83
commit
a07962ba55
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
Gemfile.lock
|
||||
.bundled_gems/
|
32
Gemfile
Normal file
32
Gemfile
Normal file
@ -0,0 +1,32 @@
|
||||
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'
|
||||
# Hold off on the empty string check for now
|
||||
#gem 'puppet-lint-empty_string-check'
|
||||
gem 'puppet-lint-leading_zero-check'
|
||||
gem 'puppet-lint-variable_contains_upcase'
|
||||
gem 'puppet-lint-numericvariable'
|
||||
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
|
3
Rakefile
3
Rakefile
@ -5,4 +5,5 @@ 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')
|
||||
PuppetLint.configuration.send('disable_class_parameter_defaults')
|
||||
PuppetLint.configuration.send('disable_arrow_alignment')
|
||||
|
@ -20,7 +20,7 @@ node 'default' {
|
||||
|
||||
case $db_provider {
|
||||
'mysql': {
|
||||
class { 'mysql::server':
|
||||
class { '::mysql::server':
|
||||
}
|
||||
|
||||
mysql::db { 'askbotdb':
|
||||
@ -32,7 +32,7 @@ node 'default' {
|
||||
}
|
||||
}
|
||||
'pgsql': {
|
||||
class { 'postgresql::server': }
|
||||
class { '::postgresql::server': }
|
||||
|
||||
postgresql::server::db { $db_name:
|
||||
user => $db_user,
|
||||
@ -46,7 +46,7 @@ node 'default' {
|
||||
}
|
||||
|
||||
# redis (custom module written by tipit)
|
||||
class { 'redis':
|
||||
class { '::redis':
|
||||
redis_port => $redis_port,
|
||||
redis_max_memory => $redis_max_memory,
|
||||
redis_bind => $redis_bind,
|
||||
@ -56,7 +56,7 @@ node 'default' {
|
||||
}
|
||||
|
||||
# solr search engine
|
||||
class { 'solr':
|
||||
class { '::solr':
|
||||
mirror => 'http://apache.mesi.com.ar/lucene/solr',
|
||||
version => $solr_version,
|
||||
cores => [ 'core-default', 'core-en', 'core-zh' ],
|
||||
@ -93,7 +93,7 @@ node 'default' {
|
||||
require => Exec['copy-solr'],
|
||||
}
|
||||
|
||||
class { 'askbot':
|
||||
class { '::askbot':
|
||||
db_provider => $db_provider,
|
||||
db_name => $db_name,
|
||||
db_user => $db_user,
|
||||
|
@ -50,7 +50,7 @@ class askbot::config (
|
||||
}
|
||||
|
||||
if $site_ssl_enabled {
|
||||
class { 'askbot::site::ssl':
|
||||
class { '::askbot::site::ssl':
|
||||
site_ssl_cert_file_contents => $site_ssl_cert_file_contents,
|
||||
site_ssl_key_file_contents => $site_ssl_key_file_contents,
|
||||
site_ssl_chain_file_contents => $site_ssl_chain_file_contents,
|
||||
@ -60,16 +60,16 @@ class askbot::config (
|
||||
}
|
||||
}
|
||||
|
||||
class { 'askbot::site::http':
|
||||
class { '::askbot::site::http':
|
||||
site_root => $site_root,
|
||||
site_name => $site_name,
|
||||
}
|
||||
|
||||
class { 'askbot::site::celeryd':
|
||||
class { '::askbot::site::celeryd':
|
||||
site_root => $site_root,
|
||||
}
|
||||
|
||||
class { 'askbot::site::config':
|
||||
class { '::askbot::site::config':
|
||||
site_root => $site_root,
|
||||
dist_root => $dist_root,
|
||||
db_provider => $db_provider,
|
||||
@ -91,16 +91,16 @@ class askbot::config (
|
||||
solr_enabled => $solr_enabled,
|
||||
}
|
||||
|
||||
class { 'askbot::site::static':
|
||||
class { '::askbot::site::static':
|
||||
site_root => $site_root,
|
||||
}
|
||||
|
||||
class { 'askbot::site::log':
|
||||
class { '::askbot::site::log':
|
||||
site_root => $site_root,
|
||||
www_group => $www_group,
|
||||
}
|
||||
|
||||
class { 'askbot::site::cron':
|
||||
class { '::askbot::site::cron':
|
||||
site_root => $site_root,
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ class askbot (
|
||||
$smtp_host = 'localhost'
|
||||
) {
|
||||
|
||||
class { 'askbot::install':
|
||||
class { '::askbot::install':
|
||||
db_provider => $db_provider,
|
||||
dist_root => $dist_root,
|
||||
askbot_repo => $askbot_repo,
|
||||
@ -110,7 +110,7 @@ class askbot (
|
||||
require => [ File[$dist_root], Package['git'] ],
|
||||
}
|
||||
|
||||
class { 'askbot::config':
|
||||
class { '::askbot::config':
|
||||
site_root => $site_root,
|
||||
dist_root => $dist_root,
|
||||
www_group => $www_group,
|
||||
|
@ -51,7 +51,7 @@ class askbot::install (
|
||||
}
|
||||
}
|
||||
|
||||
include apache::mod::wsgi
|
||||
include ::apache::mod::wsgi
|
||||
|
||||
if $solr_enabled {
|
||||
package { [ 'django-haystack', 'pysolr' ]:
|
||||
|
@ -22,7 +22,7 @@ class askbot::site::log (
|
||||
require => File["${site_root}/log"],
|
||||
}
|
||||
|
||||
include logrotate
|
||||
include ::logrotate
|
||||
logrotate::file { 'askbot':
|
||||
log => "${site_root}/log/askbot.log",
|
||||
options => [
|
||||
|
@ -8,7 +8,7 @@ class askbot::site::ssl (
|
||||
$site_ssl_key_file = '',
|
||||
$site_ssl_chain_file = '',
|
||||
) {
|
||||
include apache::ssl
|
||||
include ::apache::ssl
|
||||
|
||||
# site x509 certificate
|
||||
if $site_ssl_cert_file_contents != '' {
|
||||
|
Loading…
x
Reference in New Issue
Block a user