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.
Questions tagged [hiera]
83 questions
1
vote
1 answer
converting node inheritance to hiera
I'm working on moving over a node inheritance tree to hiera. Presently working on the hierarchy. Prior to hiera, my nodes had a hierarchy as such
base
pre-prod
qa
nodes
staging
nodes
development
nodes
prod
…

quickshiftin
- 2,125
- 5
- 27
- 41
1
vote
1 answer
Hiera can't find puppet environment
I'm testing out hiera and hitting a snag on the hierarchy configuration. What I have is extremely simple, the part that isn't working is specification of hiera datadir files based on environment. Here's the config file (/etc/hiera.yaml) I'm…

quickshiftin
- 2,125
- 5
- 27
- 41
1
vote
1 answer
Handling exceptions for modules in Puppet
I have an LDAP module in Puppet that is used by 100 servers and edits about 10 files on all servers, before it runs authconfig --updateall to activate the new LDAP configuration.
Most (98) of these servers needs a standard access-1.conf as their…

ujjain
- 3,983
- 16
- 53
- 91
1
vote
1 answer
How to use Hiera to assign modules to nodes in Puppet?
I have decided to switch from a single default nodes.pp to a Hiera back-end to manage nodes in Puppet and assign modules to nodes.
We use hostnames as such:
nyc-apache-prod-01
was-mysql-tst-01
This is our hiera.yaml and hierdata-directory…

ujjain
- 3,983
- 16
- 53
- 91
1
vote
1 answer
puppet parameterized classes and hiera
I'm running puppet open source 3.1.0 from the puppetlabs repos on RedHat Enterprise Linux 6 and using hiera 1.1.2. I'm running into what seems like either a bug or a fundamental misunderstanding on my part of how hiera works with parameterized…

Nat Baldwin
- 113
- 4
1
vote
1 answer
How to use puppet-apache mod (v8.3.0) with hiera?
Queston: Using the roles & profiles method, is it possible to use 'puppetlabs-apache', '8.3.0' with a hiera lookup?
Context:
I am using mod 'puppetlabs-apache', '8.3.0' to configure an apache server. I have a large number of apache re-write rules…

John-H
- 11
- 2
1
vote
1 answer
Puppet Class Lookup from Hiera with Automated Chaining
I am using hiera with puppet and have a puppet role/profile setup, where 1 role includes multiple profiles (as shown below). My build role includes hardcoded profiles with a number of chains at the bottom.
# build.pp - Current Role
class role::build…

douggdx
- 11
- 1
0
votes
1 answer
Puppet : call define type in class from hiera
I would like to create install_package module which can be called multi times, where packages are defined in hiera. I know class is skelton (can be called one time), and define type is designed for my purpose.
I have developped the following…

Colas06
- 1
- 1
0
votes
1 answer
puppet best practices: share variables among profiles
I'm using the roles&profiles approach for my current puppet project.
The puppet best practices tell me:
Expose all necessary profile parameters in the main class parameter list.
Perform hiera lookups to fill in those parameters (having default…

C.Scharfenberg
- 63
- 7
0
votes
1 answer
create textfile in puppet from hiera list
I have a hash with a list in hiera. I use this to automatically create the dbs in the RDBMS via create_resources
dbs:
- dbname: something
- dbname: or
- dbname: other
I would like to use this same list to automatically create a plain text…

Christoph Gösgens
- 21
- 1
- 7
0
votes
1 answer
puppet 6 template variable from hiera can't be retreived
I'm having problem when migrating the puppet code from puppet 3 to puppet 6.
This is the error message:
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function…

Diamond
- 1
- 1
0
votes
1 answer
How do you test/troubleshoot hiera in a Puppet environment
I'm using Puppet alongside Foreman to provision hosts, and I've currently got all of Puppet config as modules in a repository. I'd like to use Hiera but I've never been able to get even the simplest thing to pull from one of the .yaml files that I…

geoffjay
- 131
- 5
0
votes
2 answers
Q: How to define Apache modules via Puppet and Hiera?
I am currently using Puppet with Foreman 1.17 and puppetlabs/apache version 3.1.0. All virtual hosts are defined using a .yaml file:
apache::vhost:
vm12345_ssl:
servername: my.example.com
docroot: /home/my.example.com/web
logroot:…

nn4l
- 1,336
- 5
- 23
- 40
0
votes
1 answer
Puppet 5 : Variables not interpolated
I'm trying to update an old Puppet 3 infrastructure to Puppet 5.
I'm using Hiera to get the data, with a NoSQL backend. I've written my own ENC in order to get node data from there, and this is working well.
However, when I put variables in Hiera,…

drksnw
- 1
0
votes
1 answer
Encrypting properties with "eyaml edit" without a private key?
I would like to use eyaml edit to edit my Puppet/Hiera configuration files. My configuration files are a mixture of encrypted and plain text content. I want to use eyaml edit to encrypt certain properties. So initially my files will contain…

Mark McLaren
- 121
- 8