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

(MODULES-2096) Move default cases last #16

Merged
merged 1 commit into from
Jun 8, 2015
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifests/forwarder.pp
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@
# there is non-generic configuration that needs to be declared in addition
# to the agnostic resources declared here.
case $::kernel {
default: { } # no special configuration needed
'Linux': { class { 'splunk::platform::posix': splunkd_port => $splunkd_port, } }
'SunOS': { include splunk::platform::solaris }
default: { } # no special configuration needed
}

# Realize resources shared between server and forwarder profiles, and set up
Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@
# there is non-generic configuration that needs to be declared in addition
# to the agnostic resources declared here.
case $::kernel {
default: { } # no special configuration needed
'Linux': { include splunk::platform::posix }
'SunOS': { include splunk::platform::solaris }
default: { } # no special configuration needed
}

# Realize resources shared between server and forwarder profiles, and set up
Expand Down
6 changes: 3 additions & 3 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@

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

# Settings common to an OS family
case $::osfamily {
default: { $pkg_provider = undef } # Don't define a $pkg_provider
'RedHat': { $pkg_provider = 'rpm' }
'Debian': { $pkg_provider = 'dpkg' }
'Solaris': { $pkg_provider = 'sun' }
default: { $pkg_provider = undef } # Don't define a $pkg_provider
}

# Settings specific to an architecture as well as an OS family
case "${::osfamily} ${::architecture}" {
default: { fail("unsupported osfamily/arch ${::osfamily}/${::architecture}") }
'RedHat i386': {
$package_suffix = "${version}-${build}.i386.rpm"
$forwarder_pkg_name = 'splunkforwarder'
Expand Down Expand Up @@ -182,6 +181,7 @@
$forwarder_pkg_name = 'splunkforwarder'
$server_pkg_name = 'splunk'
}
default: { fail("unsupported osfamily/arch ${::osfamily}/${::architecture}") }
}

$forwarder_src_pkg = "splunkforwarder-${package_suffix}"
Expand Down