DataDog / puppet-datadog-agent

Puppet module to install the Datadog agent
Other
52 stars 261 forks source link

using hiera to use docker_daemon integration #245

Open obenziane2 opened 8 years ago

obenziane2 commented 8 years ago

I'm running to an issue when i can't declare the class datadog_agent twice to include docker_daemon integration to puppet version "3.8.7".

Does anyone know how to use it in hieara that includes datadog keys and integration modules ?

using the old method raises errors with being said that "Error: Duplicate declaration: Class[Datadog_agent] is already declared; cannot redeclare at....."


include 'datadog_agent::integrations::docker_daemon' class { 'datadog_agent': api_key => "xxxxxxxxxxxxxxxxxxxxxx"

}

ckolos commented 7 years ago

I used a class declaration to include docker_daemon config

class {                                                                                                                      
    'datadog_agent::integrations::docker_daemon':                                                                              
      require => Class['Datadog_Agent'],                                                                                       
      tags    => ["app:$app_name","type:$app_type"],                                                                           

  }

ymmv

dschaaff commented 6 years ago
include datadog_agent
include datadog_agent::integrations::docker_daemon

add your variables in hiera

datadog_agent::api_key: foo