Hey there,
Thanks for taking the time to read this. My end objective is to utilize a yaml boolean, in this case couchDbServer, as an entry for a case that dictates whether a file is present or not. I do not want to use stdlib to achieve this.
Following is the code:
class datadog {
$datadogApiKey = hiera('datadogApiKey', nil)
$couchDbServer = hiera('couchDbServer', nil)
yumrepo { 'datadog':
descr => 'Datadog, Inc.',
enabled => 1,
gpgcheck => 0,
} ->
package { 'datadog-agent':
ensure => 'installed',
} ->
file { 'datadog.conf':
path => '/etc/dd-agent/datadog.conf',
ensure => 'present',
content => template('datadog/datadog.conf.erb'),
} ->
file { 'couchdb.yaml':
path => '/etc/dd-agent/conf.d/couchdb.yaml',
ensure => 'present',
content => template('datadog/couchdb.yaml.erb'),
} ->
service { 'datadog-agent':
ensure => 'running',
enable => 'true',
subscribe => File[
'/etc/dd-agent/datadog.conf',
'/etc/dd-agent/conf.d/couchdb.yaml'
],
}
}
I've tried a ton of things, but none of it works. Can someone please advise the proper solution?