This repository has been archived by the owner on Sep 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change includes a workaround for a bug [1] found in the upstream puppet-collectd module. [1] voxpupuli/puppet-collectd#162 Change-Id: I560e0436cfefb026d2c7a979091208a399bbe2fd
- Loading branch information
Simon Pasquier
committed
Aug 4, 2015
1 parent
0806877
commit fa2da1a
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
deployment_scripts/puppet/modules/lma_collector/lib/facter/collectd_version.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright 2015 Mirantis, Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may | ||
# not use this file except in compliance with the License. You may obtain | ||
# a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
|
||
# Workaround because the puppet-collectd module cannot detect the collectd's | ||
# version until the package is installed. | ||
# | ||
# See https://github.com/pdxcat/puppet-module-collectd/issues/162 for details. | ||
Facter.add("collectd_version") do | ||
setcode do | ||
case Facter.value('osfamily') | ||
when /(?i)(debian)/ | ||
"5.4.0-3ubuntu2" | ||
when /(?i)(redhat)/ | ||
"5.4.1-5.mira1.mira1" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters