Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
Avoid compilation failure with strict_variables=true
Browse files Browse the repository at this point in the history
When strict_variables is on and mcollective has yet to be installed,
mco_version isn't defined, so referring to it here breaks compilation.
The fix here uses a pattern used by puppetlabs-apt.
  • Loading branch information
bootc committed Jul 8, 2016
1 parent 6b13fa8 commit 25d81d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion manifests/defaults.pp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@
# https://docs.puppetlabs.com/mcollective/releasenotes.html#libdirloadpath-changes-and-core-plugins
$mco_assumed_version = '2.8.5'

$_mco_version = pick_default($::mco_version, $mco_assumed_version)
$_mco_version = defined('$mco_version') ? {
true => $::mco_version,
default => $mco_assumed_version,
}
if versioncmp($_mco_version, '2.8') >= 0 {
$core_libdir = undef
} else {
Expand Down

0 comments on commit 25d81d2

Please sign in to comment.