Skip to content

Commit 8e593ad

Browse files
author
Jarret Lavallee
committed
Ensure OSP compatibility with excludes
Prior to this commit, if the `pe_server_version` fact was missing the code would error out. This commit enables OSP and older versions of PE.
1 parent 08a2d8a commit 8e593ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functions/version_based_excludes.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ function puppet_metrics_collector::version_based_excludes(
33
) >> Array[String] {
44
case $metrics_type {
55
'puppetserver': {
6-
$excludes = versioncmp($facts['pe_server_version'], '2017.3.0') >= 0 ? {
6+
$excludes = ($facts['pe_server_version'] =~ NotUndef and versioncmp($facts['pe_server_version'], '2017.3.0') >= 0) ? {
77
true => ['file-sync-storage-service','pe-puppet-profiler','pe-master','pe-jruby-metrics'],
88
default => ['file-sync-storage-service'],
99
}

0 commit comments

Comments
 (0)