Skip to content

Commit aedca40

Browse files
committed
Merge branch 'master' of github.com:DataDog/puppet-datadog-agent
2 parents da2b65d + f0cca16 commit aedca40

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

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: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@
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+
} else {
30+
$_gemprovider = $gemprovider
31+
}
2432

2533
# check to make sure that you're not installing rubydev somewhere else
2634
if ! defined(Package[$rubydev_package]) {
@@ -48,7 +56,7 @@
4856

4957
package{'dogapi':
5058
ensure => 'installed',
51-
provider => 'gem',
59+
provider => $_gemprovider,
5260
}
5361

5462
}

0 commit comments

Comments
 (0)