Commit 6fd0f87f authored by Sebastien Badia's avatar Sebastien Badia Committed by David Gurtner

Add Puppet 4.x lint checks

This changes the puppet-lint requirement to 1.1.x, so that we can use
puppet-lint plugins. Most of these plugins are for 4.x compat, but some
just catch common errors.

Change-Id: If9f969703d99f3a45fd1822208a2b1342f13e49a
parent 94c8f1ed
......@@ -6,6 +6,16 @@ group :development, :test do
gem 'beaker-rspec', '~> 2.2.4', :require => false
gem 'puppet-lint-param-docs'
gem 'metadata-json-lint'
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-leading_zero-check'
gem 'puppet-lint-variable_contains_upcase'
gem 'puppet-lint-numericvariable'
gem 'json'
gem 'webmock'
gem 'minitest', :require => false
......
......@@ -6,6 +6,16 @@ group :development, :test do
gem 'rspec-puppet', '~> 2.0.0', :require => false
gem 'metadata-json-lint'
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-leading_zero-check'
gem 'puppet-lint-variable_contains_upcase'
gem 'puppet-lint-numericvariable'
gem 'rspec-system', :git => 'https://github.com/aldavud/rspec-system.git', :branch => 'master'
gem 'rspec-system-puppet', :git => 'https://github.com/aldavud/rspec-system-puppet.git', :branch => 'master'
end
......
......@@ -110,7 +110,7 @@ class ceph (
$cluster_network = undef,
$public_network = undef,
) {
include ceph::params
include ::ceph::params
package { $::ceph::params::packages :
ensure => $ensure,
......
......@@ -20,17 +20,17 @@
# Base profile to install ceph and configure /etc/ceph/ceph.conf
#
class ceph::profile::base {
include ceph::profile::params
include ::ceph::profile::params
if ( $ceph::profile::params::manage_repo ) {
Class['ceph::repo'] -> Class['ceph']
class { 'ceph::repo':
class { '::ceph::repo':
release => $ceph::profile::params::release,
}
}
class { 'ceph':
class { '::ceph':
fsid => $ceph::profile::params::fsid,
authentication_type => $ceph::profile::params::authentication_type,
osd_pool_default_pg_num => $ceph::profile::params::osd_pool_default_pg_num,
......
......@@ -32,7 +32,7 @@ class ceph::profile::osd {
}
}
class { 'ceph::osds':
class { '::ceph::osds':
args => $ceph::profile::params::osds,
}
}
......@@ -48,7 +48,7 @@ class ceph::repo (
) {
case $::osfamily {
'Debian': {
include apt
include ::apt
apt::key { 'ceph':
ensure => $ensure,
......@@ -97,7 +97,7 @@ class ceph::repo (
}
'RedHat': {
$enabled = $ensure ? { present => '1', absent => '0', default => absent, }
$enabled = $ensure ? { 'present' => '1', 'absent' => '0', default => absent, }
yumrepo { 'ext-epel-6.8':
# puppet versions prior to 3.5 do not support ensure, use enabled instead
enabled => $enabled,
......
......@@ -65,17 +65,17 @@ define ceph::rgw::apache (
$ceph_apache_repo = true,
) {
class { 'apache':
class { '::apache':
default_mods => false,
default_vhost => false,
}
include apache::mod::alias
include apache::mod::auth_basic
include ::apache::mod::alias
include ::apache::mod::auth_basic
apache::mod { 'fastcgi':
package => $pkg_fastcgi,
}
include apache::mod::mime
include apache::mod::rewrite
include ::apache::mod::mime
include ::apache::mod::rewrite
apache::vhost { "${rgw_dns_name}-radosgw":
servername => $rgw_dns_name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment