Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Commit

Permalink
Merge pull request #344 from sdodson/puppet-lint
Browse files Browse the repository at this point in the history
puppet-lint per Puppet Approved Criteria
  • Loading branch information
sdodson committed Nov 12, 2014
2 parents 3a0ec49 + aec8dca commit 4fc35dd
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 19 deletions.
16 changes: 10 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@ require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
require 'puppet-syntax/tasks/puppet-syntax'

# puppet-lint parameters per puppet approved criteria
# https://forge.puppetlabs.com/approved/criteria#validation
PuppetLint.configuration.fail_on_warnings
PuppetLint.configuration.send("disable_80chars")
PuppetLint.configuration.log_format = "%{path}:%{linenumber}:%{check}:%{KIND}:%{message}"
PuppetLint.configuration.fail_on_warnings = true

# Forsake support for Puppet 2.6.2 for the benefit of cleaner code.
# http://puppet-lint.com/checks/class_parameter_defaults/
PuppetLint.configuration.send('disable_class_parameter_defaults')
PuppetLint.configuration.send("relative")
# http://puppet-lint.com/checks/class_inherits_from_params_class/
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
# http://puppet-lint.com/checks/class_parameter_defaults/
PuppetLint.configuration.send('disable_class_parameter_defaults')
# Approved criteria disable these two but lets be a bit more stringent
#PuppetLint.configuration.send('disable_documentation')
#PuppetLint.configuration.send('disable_single_quote_string_with_variables')
PuppetLint.configuration.log_format = "%{path}:%{linenumber}:%{check}:%{KIND}:%{message}"

exclude_paths = [
"pkg/**/*",
Expand Down
16 changes: 8 additions & 8 deletions manifests/broker.pp
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@
anchor { 'openshift_origin::broker_dns_begin': } ->
class { 'openshift_origin::plugins::dns::nsupdate': } ->
anchor { 'openshift_origin::broker_dns_end': }
}
}
'avahi' : {
anchor { 'openshift_origin::broker_dns_begin': } ->
class { 'openshift_origin::plugins::dns::avahi': } ->
anchor { 'openshift_origin::broker_dns_end': }
}
}
'route53' : {
anchor { 'openshift_origin::broker_dns_begin': } ->
class { 'openshift_origin::plugins::dns::route53': } ->
anchor { 'openshift_origin::broker_dns_end': }
}
}
default : { fail('A broker_dns_plugin value must be specified. Supported values are: nsupdate, avahi, route53.') }
}

Expand All @@ -58,27 +58,27 @@
anchor { 'openshift_origin::broker_auth_begin': } ->
class { 'openshift_origin::plugins::auth::mongo': } ->
anchor { 'openshift_origin::broker_auth_end': }
}
}
'htpasswd' : {
anchor { 'openshift_origin::broker_auth_begin': } ->
class { 'openshift_origin::plugins::auth::htpasswd': } ->
anchor { 'openshift_origin::broker_auth_end': }
}
}
'kerberos' : {
anchor { 'openshift_origin::broker_auth_begin': } ->
class { 'openshift_origin::plugins::auth::kerberos': } ->
anchor { 'openshift_origin::broker_auth_end': }
}
}
'ldap' : {
anchor { 'openshift_origin::broker_auth_begin': } ->
class { 'openshift_origin::plugins::auth::ldap': } ->
anchor { 'openshift_origin::broker_auth_end': }
}
}
default : {
anchor { 'openshift_origin::broker_auth_begin': } ->
class { 'openshift_origin::plugins::auth::htpasswd': } ->
anchor { 'openshift_origin::broker_auth_end': }
}
}
}

package {
Expand Down
4 changes: 2 additions & 2 deletions manifests/cartridges.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}

openshift_origin::openshift_cartridge { $::openshift_origin::install_cartridges: }

$recommended_deps = prefix($::openshift_origin::install_cartridges_recommended_deps, 'openshift-origin-cartridge-dependencies-recommended-')
package { $recommended_deps:
ensure => present,
Expand All @@ -31,7 +31,7 @@
ensure => present,
}
}

if $::openshift_origin::development_mode == true {
openshift_origin::openshift_cartridge { [ 'mock', 'mock-plugin' ]: }
}
Expand Down
2 changes: 1 addition & 1 deletion manifests/nameserver.pp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
$named_files = unique(flatten([$named_base_files, $named_infra_files]))

exec { 'named restorecon':
command => '/sbin/restorecon -rv ${restorecon_paths}',
command => "/sbin/restorecon -rv ${restorecon_paths}",
require => Exec['create rndc.key'],
notify => Service['named'],
refreshonly => true,
Expand Down
4 changes: 2 additions & 2 deletions manifests/node.pp
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,12 @@
anchor { 'openshift_origin::node_container_begin': } ->
class { 'openshift_origin::plugins::container::selinux': } ->
anchor { 'openshift_origin::node_container_end': }
}
}
'libvirt': {
anchor { 'openshift_origin::node_container_begin': } ->
class { 'openshift_origin::plugins::container::libvirt': } ->
anchor { 'openshift_origin::node_container_end': }
}
}
default: {}
}

Expand Down
14 changes: 14 additions & 0 deletions manifests/role/load_balancer.pp
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2014 Red Hat, Inc., All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
class openshift_origin::role::load_balancer inherits openshift_origin::role {
include openshift_origin::load_balancer
include openshift_origin::register_dns
Expand Down

0 comments on commit 4fc35dd

Please sign in to comment.