Browse files

adding a if defined() to install gems and dev for reports

  • Loading branch information...
1 parent 4e589a5 commit 2d264acb321bd3ee85ac114b056969fb638d85bd @robbyt robbyt committed Dec 20, 2011
Showing with 27 additions and 0 deletions.
  1. +27 −0 manifests/reports.pp
View
27 manifests/reports.pp
@@ -18,6 +18,33 @@
$puppetmaster_user
) {
+ include datadog::params
+ $rubygems_package = $datadog::params::rubygems_package
+ $rubydev_package =$datadog::params::rubydev_package
+
+ # check to make sure that you're not installing rubygems somewhere else,
+ # and install it if it's not defined elsewhere in your puppet catalog
+ if defined(Package[$rubygems_package]) {
+ # pass
+ # puppet DSL lacks a 'not' in < 2.6.8
+ } else {
+ package {"$rubygems_package":
+ ensure => installed,
+ before => Package['dogapi'],
+ }
+ }
+
+ # check to make sure that you're not installing rubydev somewhere else
+ if defined(Package[$rubydev_package]) {
+ # pass
+ # puppet DSL lacks a 'not' in < 2.6.8
+ } else {
+ package {"$rubydev_package":
+ ensure => installed,
+ before => Package['dogapi'],
+ }
+ }
+
file { "/etc/dd-agent/datadog.yaml":
ensure => file,
content => template("datadog/datadog.yaml.erb"),

0 comments on commit 2d264ac

Please sign in to comment.