Skip to content

Commit

Permalink
Fix lint warnings and ensure lint fails on warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Colleen Murphy committed Mar 19, 2015
1 parent 44dd107 commit 78183a1
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'

PuppetLint.configuration.fail_on_warnings
PuppetLint.configuration.fail_on_warnings = true
PuppetLint.configuration.send('relative')
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
Expand Down
16 changes: 8 additions & 8 deletions manifests/config.pp
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#
class ntp::config inherits ntp {

if $keys_enable {
$directory = ntp_dirname($keys_file)
if $ntp::keys_enable {
$directory = ntp_dirname($ntp::keys_file)
file { $directory:
ensure => directory,
owner => 0,
group => 0,
mode => '0755',
ensure => directory,
owner => 0,
group => 0,
mode => '0755',
}
}

file { $config:
file { $ntp::config:
ensure => file,
owner => 0,
group => 0,
mode => '0644',
content => template($config_template),
content => template($ntp::config_template),
}

}
6 changes: 3 additions & 3 deletions manifests/install.pp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#
class ntp::install inherits ntp {

if $package_manage {
if $ntp::package_manage {

package { $package_name:
ensure => $package_ensure,
package { $ntp::package_name:
ensure => $ntp::package_ensure,
}

}
Expand Down
10 changes: 5 additions & 5 deletions manifests/service.pp
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#
class ntp::service inherits ntp {

if ! ($service_ensure in [ 'running', 'stopped' ]) {
if ! ($ntp::service_ensure in [ 'running', 'stopped' ]) {
fail('service_ensure parameter must be running or stopped')
}

if $service_manage == true {
if $ntp::service_manage == true {
service { 'ntp':
ensure => $service_ensure,
enable => $service_enable,
name => $service_name,
ensure => $ntp::service_ensure,
enable => $ntp::service_enable,
name => $ntp::service_name,
hasstatus => true,
hasrestart => true,
}
Expand Down

0 comments on commit 78183a1

Please sign in to comment.