Questions tagged [hiera]

Hiera is able to read yaml files based on facts, .e.g. if facter domain returns dev.example.com and a dev.example.com.yaml file exist the file is read and the key-values are used. Using hiera can reduce the number of Puppet code lines.

83 questions
0
votes
1 answer

Puppet: Nagios with regex node names

I am configuring a puppet master and want to rely heavily on hiera. Many of my systems will be almost identical due to being scalable. I have therefore created node manifests which use regex rather than having individual node configurations for each…
Jacob Tomlinson
  • 403
  • 2
  • 5
  • 15
0
votes
1 answer

Need help writing a wrapper for Hiera yaml data

This post seems like it might be helpful but I haven't been able to adapt it to my needs. The meat of it is: $custom_thing = ('custom_thing',{}) create_resources(param, $custom_thing) full post on serverfault Here is my Hiera…
mr.zog
  • 923
  • 3
  • 20
  • 39
0
votes
1 answer

Hiera concatenated lookup from yaml

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…
Engineer2021
  • 601
  • 8
  • 25
0
votes
1 answer

Puppet, hiera and erb - erb would not recognize array

I have a pretty annoying error I am desperate to fix. I have a puppet module where certain things are kept in a yaml file (hiera) so that people could quickly edit just that part. The structure is nested. The template like this: <%=…
Roman Grazhdan
  • 334
  • 3
  • 15
0
votes
1 answer

Plan lookup: Could not find class

When running a Puppet plan that uses lookup{} function against Hiera I get the error: The target node: 'computer1.domain.com' errored with a message: Internal Server Error: org.jruby.exceptions.RuntimeError: (PreformattedError) Evaluation Error:…
woter324
  • 233
  • 1
  • 3
  • 10
-1
votes
2 answers

hiera.yaml is not loading on vagrant provision

Whenever I provision vagrant all the data is nil. When I ssh in and specify /etc/puppet/hiera.yaml as the config option i can get the values. How can I get vagrant to use the right hiera.config file? # Enable the Puppet…
-2
votes
1 answer

Return yaml value to puppet fact lookup

I'm trying to resolve a YAML value in a module file { '/boot/config.txt' : ensure => present, mode => '0755', content => $::hostname?{ 'serverName1.domain' => template('template1'), default => template('template2'), …
Dave Shaw
  • 31
  • 5
-3
votes
1 answer

Puppet noob, stuck on the same error for hours

I'm trying to setup a puppet master with hiera. When I try "puppet agent --test" on the mongo node I get this error. Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find default node or by name with…
Alex
  • 9
  • 2
1 2 3 4 5
6