I am trying to configure the puppet-logstash module via Hiera. When I make the call to hiera('profiles::logstash::config')
, the return value is a concatenated string. It tells me that it cannot convert a String into a hash.
shipper.pp
class profiles::logstash::shipper() {
$shipper_config = hiera('profiles::logstash::config')
notice("${shipper_config}")
class { 'logstash':
ensure => 'present',
version => '1.4.1-1_bd507eb',
status => 'enabled',
}
profiles::logstash::config { $shipper_config: }
include logstash
}
hostname.yaml
classes:
- os::repo
- profiles::logstash::shipper
profiles::logstash::config:
- {content: this is a test, order: 10}
Output when used with notice()
:
order10contentthis is a test
Did I order my YAML wrong?