Skip to content

Commit

Permalink
Merge pull request #16 from puppetlabs/fix-default-case-order
Browse files Browse the repository at this point in the history
(MODULES-2096) Move default cases last
  • Loading branch information
hunner committed Jun 8, 2015
2 parents 52f9c35 + b28ef88 commit 7303ed1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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

0 comments on commit 7303ed1

Please sign in to comment.