Skip to content

Commit bbb2ad1

Browse files
committed
[reporting] PE and POSS require puppetserver_gem to get the dogapi gem in the JRuby env.
[reporting] updating README.
1 parent 5823f78 commit bbb2ad1

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ that needs to be done.
5959
puppet_run_reports => true,
6060
}
6161

62-
__To support reporting, your Puppet master needs to have the [dogapi](https://github.com/DataDog/dogapi-rb) gem installed, to do that either run the puppet agent on your master with this configuration or install it manually with `gem`__
62+
__To support reporting, your Puppet master needs to have the [dogapi](https://github.com/DataDog/dogapi-rb) gem installed, to do that either run the puppet agent on your master with this configuration or install it manually with `gem`.__
63+
_Please note if on Puppet Enterprise or POSS (ie. >=3.7.0) there is a soft dependency for reporting on the `puppetserver_gem` module. Install with `puppet module install puppetlabs-puppetserver_gem` - installing manually with `gem` will *not* work._
6364

6465
3. Include any other integrations you want the agent to use, e.g.
6566

@@ -97,6 +98,7 @@ And on all of your Puppet client nodes add:
9798
# ...
9899
report=true
99100

101+
100102
If you get
101103

102104
err: Could not send report:

manifests/reports.pp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121

2222
include datadog_agent::params
2323
$rubydev_package = $datadog_agent::params::rubydev_package
24+
$gemprovider = 'puppetserver_gem'
25+
26+
# set the right provider
27+
if (!defined('$::serverversion') or versioncmp($::serverversion, '3.7.0') < 0) {
28+
$gemprovider = 'gem'
29+
}
2430

2531
# check to make sure that you're not installing rubydev somewhere else
2632
if ! defined(Package[$rubydev_package]) {
@@ -48,7 +54,7 @@
4854

4955
package{'dogapi':
5056
ensure => 'installed',
51-
provider => 'gem',
57+
provider => $gemprovider,
5258
}
5359

5460
}

0 commit comments

Comments
 (0)