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

dynamic values inside hiera classes

below is my common.yaml file --- classes: - home_setup::falcon_logical_name home_setup::falcon_logical_name::user: 'falcuat' home_setup::falcon_logical_name::group: 'falcgrp' home_setup::falcon_logical_name::env:…
Sam S
  • 21
  • 1
0
votes
1 answer

Puppet not pulling Hiera value

Learning Puppet and Hiera and I've run into a roadblock. I apologize in advance if this is something simple. Given the following files within my GitLab for the PuppetClass es_strat: hiera.yaml --- version: 5 defaults: data_hash: yaml_data …
Tronyx
  • 1
  • 2
0
votes
1 answer

how do create puppet file directory resource using variable in the name so that it does not add brackets around the name []

When I try the following in my manifest. $profile = hiera('duplicity::profile', 'test123') file { [ "/tmp/${profile}" ]: ensure => directory, owner => root, group => root, } I have the following defined in the heira for that…
nelaaro
  • 644
  • 4
  • 10
  • 27
0
votes
2 answers

Puppet/hiera : generate sereval files from one template

I'm running puppet 4 and I would like to generate several config files from the same template with different configurations for each one. for example : # cat /tmp/a.conf test1 # cat /tmp/b.conf test2 And I need to put all those informations in…
Skullone
  • 195
  • 1
  • 1
  • 11
0
votes
1 answer

RedHat Satellite/Katello and Hiera

I'm using RedHat Satellite 6.1.1, and am successfully syncing Puppet modules from a local forge into the Katello part of Satellite. However, I'm not sure how to go about syncing my Hiera data. Obviously I'd like to leverage the lifecycle management…
shearn89
  • 3,403
  • 2
  • 15
  • 39
0
votes
1 answer

failing to look up hiera-file value from puppet

I'm in the process of upgrading an old puppet 2.7 installation to puppet 3.8, and I've also been shuffling the location of some of hiera's data. I'm not sure which is to blame here. puppet agent --test, run on the same system running the…
mc0e
  • 5,866
  • 18
  • 31
0
votes
1 answer

Puppet - using hiera parameters in a top scope manifest file

I have a site.pp file which looks like this: Package {allow_virtual => false,} stage { 'pre': before => Stage['main'] } stage { 'post': require => Stage['main'] } resources { 'firewall': purge => true } node default { …
RikSaunderson
  • 207
  • 4
  • 13
0
votes
1 answer

Using hiera to include modules in example42/apache

I'm trying to set up a puppet configuration for work (open source version), and my goal is to create a sort of standard class that most of our servers could just use with a simple hiera_include in the manifest. I'm trying some apache puppet modules…
Ulrar
  • 387
  • 6
  • 23
0
votes
1 answer

Puppet: How to fix "Unknown function hiera_include"?

I've installed Puppet using the foreman-installer and it installed successfully. Then, I wanted to install Hiera as I have some modules which use hiera functions so I've installed hiera and created a relevant hiera.yaml file in /etc/puppet which…
Itai Ganot
  • 10,644
  • 29
  • 93
  • 146
0
votes
1 answer

Disable Puppet ENC part in Foreman

I looked for this for days now, and I'm quite depressed. We want to use Foreman as a monitoring and provisionnig tool. We would like to deactivate Foreman's ENC and use only Hiera. How could I manage that? As to the why: my boss wants it like…
0
votes
0 answers

How do dynamically get the hostname of another machine in hiera?

I have a few machines, one of those has the class dbserver assigned via ENC. The other machines run software which need the DB. Now I want to configure this software to be able to connect to the DB. I usually prefer to use the hiera autolookup…
sinned
  • 473
  • 2
  • 6
  • 15
0
votes
1 answer

Linux-Puppet: Error: Could not retrieve catalog from remote server, what could be the reason?

I've wrote a Puppet module which is supposed to create a directory, copy files into there and change the ownership of the files. The module name is "workspace". In the manifests folder of the module there are three files: -rw-r--r-- 1 root root 9578…
Itai Ganot
  • 10,644
  • 29
  • 93
  • 146
0
votes
1 answer

How to return default hash keys in hiera_hash() call?

In an attempt to clean up my client's Hiera data for Puppet, and drastically reduce the number of Hiera calls in the Puppet manifests, I'm changing constructs like some_name::key1: a_value_1 some_name::key2: a_value_2 [...] some_name::keyX:…
Simon
  • 193
  • 2
  • 10
0
votes
1 answer

Install of hiera-puppet-1.0.0-1.el6.noarch conflicts with file from package puppet-3.7.1-1.el6.noarch

Installing puppet and hiera sudo rpm -ivh http://yum.puppetlabs.com/el/6.4/products/x86_64/puppetlabs-release-6-11.noarch.rpm sudo yum update -y sudo yum -y install vim unzip rubygems puppet puppet-server hiera-puppet git results in: Resolving…
030
  • 5,901
  • 13
  • 68
  • 110
0
votes
2 answers

Hiera datatypes wont load in Puppet

I have spent a couple of days on this, followed the instructions on http://downloads.puppetlabs.com/docs/puppetmanual.pdf and even the Puppet Training Advanced Puppet manual. When I run a test against it, the results always come back as 'nil' and Im…
Cole Shores
  • 123
  • 2