Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix lint issues #12

Merged
merged 1 commit into from
Dec 18, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'rspec-system/rake_task'
require 'puppet-lint/tasks/puppet-lint'

PuppetLint.configuration.fail_on_warnings
PuppetLint.configuration.send('relative')
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
PuppetLint.configuration.send('disable_documentation')
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
PuppetLint.configuration.send('disable_only_variable_string')
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]
3 changes: 2 additions & 1 deletion manifests/forwarder.pp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
$path_delimiter = $splunk::params::path_delimiter
$pkg_path_parts = [$staging::path, $staging_subdir, $staged_package]
$pkg_source = join($pkg_path_parts, $path_delimiter)
$pkg_provider = $splunk::params::pkg_provider

staging::file { $staged_package:
source => $package_source,
Expand Down Expand Up @@ -94,7 +95,7 @@
value => "${server}:${logging_port}",
tag => 'splunk_forwarder',
}
ini_setting { "forwarder_splunkd_port":
ini_setting { 'forwarder_splunkd_port':
path => "${splunk::params::forwarder_confdir}/web.conf",
section => 'settings',
setting => 'mgmtHostPort',
Expand Down
4 changes: 2 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@
value => 'dns',
tag => 'splunk_server',
}
ini_setting { "splunk_server_splunkd_port":
ini_setting { 'splunk_server_splunkd_port':
path => "${splunk::params::server_confdir}/web.conf",
section => 'settings',
setting => 'mgmtHostPort',
value => "${splunkd_listen}:${splunkd_port}",
require => Package[$package_name],
notify => Service[$virtual_service],
}
ini_setting { "splunk_server_web_port":
ini_setting { 'splunk_server_web_port':
path => "${splunk::params::server_confdir}/web.conf",
section => 'settings',
setting => 'httpport',
Expand Down
32 changes: 16 additions & 16 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
class splunk::params (
$version = '5.0.5',
$build = '179365',
$src_root = "puppet:///modules/splunk",
$src_root = 'puppet:///modules/splunk',
$splunkd_port = '8089',
$logging_port = '9997',
) {
Expand All @@ -82,7 +82,7 @@

# Settings common to a kernel
case $::kernel {
default: { fail("splunk module does not support kernel ${kernel}") }
default: { fail("splunk module does not support kernel ${::kernel}") }
'Linux': {
$path_delimiter = '/'
$forwarder_src_subdir = 'universalforwarder/linux'
Expand Down Expand Up @@ -140,24 +140,24 @@
}

# Settings specific to an architecture as well as an OS family
case "$::osfamily $::architecture" {
default: { fail("unsupported osfamily/arch $::osfamily/$::architecture") }
"RedHat i386": {
case "${::osfamily} ${::architecture}" {
default: { fail("unsupported osfamily/arch ${::osfamily}/${::architecture}") }
'RedHat i386': {
$package_suffix = "${version}-${build}.i386.rpm"
$forwarder_pkg_name = "splunkforwarder"
$server_pkg_name = "splunk"
$forwarder_pkg_name = 'splunkforwarder'
$server_pkg_name = 'splunk'
}
"RedHat x86_64": {
'RedHat x86_64': {
$package_suffix = "${version}-${build}-linux-2.6-x86_64.rpm"
$forwarder_pkg_name = "splunkforwarder"
$server_pkg_name = "splunk"
$forwarder_pkg_name = 'splunkforwarder'
$server_pkg_name = 'splunk'
}
"Debian i386": {
'Debian i386': {
$package_suffix = "${version}-${build}-linux-2.6-intel.deb"
$forwarder_pkg_name = 'splunkforwarder'
$server_pkg_name = 'splunk'
}
"Debian amd64": {
'Debian amd64': {
$package_suffix = "${version}-${build}-linux-2.6-amd64.deb"
$forwarder_pkg_name = 'splunkforwarder'
$server_pkg_name = 'splunk'
Expand All @@ -172,20 +172,20 @@
$forwarder_pkg_name = 'UniversalForwarder'
$server_pkg_name = 'Splunk'
}
"Solaris i86pc": {
'Solaris i86pc': {
$package_suffix = "${version}-${build}-solaris-10-intel.pkg"
$forwarder_pkg_name = 'splunkforwarder'
$server_pkg_name = 'splunk'
}
"Solaris sun4v": {
'Solaris sun4v': {
$package_suffix = "${version}-${build}-solaris-8-sparc.pkg"
$forwarder_pkg_name = 'splunkforwarder'
$server_pkg_name = 'splunk'
}
}

$forwarder_src_pkg = "splunkforwarder-$package_suffix"
$server_src_pkg = "splunk-$package_suffix"
$forwarder_src_pkg = "splunkforwarder-${package_suffix}"
$server_src_pkg = "splunk-${package_suffix}"

$server_pkg_src = "${src_root}/${server_src_subdir}/${server_src_pkg}"
$forwarder_pkg_src = "${src_root}/${forwarder_src_subdir}/${forwarder_src_pkg}"
Expand Down
10 changes: 5 additions & 5 deletions manifests/platform/solaris.pp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
$adminfile = '/var/sadm/install/admin/splunk-noask'

file { 'splunk_adminfile':
ensure => file,
path => $adminfile,
owner => 'root',
group => 'root',
source => 'puppet:///modules/splunk/splunk-noask',
ensure => file,
path => $adminfile,
owner => 'root',
group => 'root',
source => 'puppet:///modules/splunk/splunk-noask',
}

file { 'splunk_pkg_response_file':
Expand Down