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
Does Puppet 2.7 allow a class inheritance of an unparameterized "params" class?
I'm getting the following error when I run puppet-lint:
$ puppet-lint manifests/*
manifests/init.pp - WARNING: class inheriting from params class on line 72
I had myself a quick search on duckduckgo.com, and got this:…

Nathan Basanese
- 341
- 2
- 5
- 19
1
vote
1 answer
Best way for user management with Hiera
I am currently trying to move our Puppet setup to further use Hiera. In regard to this, I would like to create the users with Hiera, but having some problems how to do this when moving up in the hierarchy.
The scenario is that I want to have a set…

Hellstorm
- 145
- 6
1
vote
1 answer
Getting puppetlabs-apt module apt::ppa working in puppet hiera
I'm using the puppetlabs-apt forge module together with hiera in puppet 3.8.5.
Adding apt::sources works:
apt::sources:
'ubuntu':
location: 'http://server.com/ubuntu'
release: "%{::lsbdistcodename}"
repos: 'main restricted universe…

Craig
- 11
- 1
1
vote
0 answers
hiera_hash/hiera_array in foreman?
Is there a way in foreman to have puppet variables appended from parent host groups?
Example of desired functionality:
AllHosts:
ssh_allow[10.1.1.0/32]
AllHosts/publicHosts:
ssh_allow[71.0.0.0/8]
A host in the publicHost groups would…

gfreestone
- 31
- 1
1
vote
1 answer
Load hiera file from specific variable/fact/hiera-value
I'm trying to load a hiera file according to a specific flag.
Hiera hierarachy configuration is
:hierarchy:
- "%{environment}/%{::fqdn}"
- "%{environment}/%{nodetype}"
- "%{environment}/%{calling_module}"
- "%{environment}"
-…

DevOps
- 720
- 5
- 16
1
vote
2 answers
Optionally pass parameter to puppet using hiera
We're using the roles/profiles pattern. In the example below I'd like to optionally pass a parameter from hiera so that if no value is provided then the ::apache class default is used (which it gets internally from its ::apache::params class). This…

Michelle
- 923
- 5
- 20
- 30
1
vote
0 answers
Puppet node no picking up hiera parameter from global.yaml file
I am using Foreman, Puppet and Hiera to provide parameter data for my nodes. Each node has its own node.yaml file on the Puppet Master in /etc/puppet/hieradata. There is also a global.yaml file which defines some other parameters not found found…

Tom Arnautovic
- 11
- 2
1
vote
2 answers
Get value from hiera hash in Puppet
I have this structure in my hiera file that create some rules in my smb.conf.
samba::shares:
PDF:
- comment = "PDF"
- path = /home/smb/pdf
- browseable = yes
- hide dot files = yes
- read only = no
- public = yes
-…

Oyabi
- 133
- 2
- 13
1
vote
1 answer
Puppet module not run on agents while this has been defined in Hiera on the Puppetmaster
Once I've installed Puppet, Foreman, Hiera and Facter, how do I get them all to work with one another?
The Foreman GUI is operating properly and can be viewed using a browser.
Hiera is installed, and by guides I read on the internet it seems like…

Itai Ganot
- 10,644
- 29
- 93
- 146
1
vote
1 answer
How to instantiate multiple instances of the same resource using Hiera
Using Hiera, is it possible to instantiate two classes with different properties?
I know I can do add to my node declaration:
user{'francois':
uid => 1000,
# ...
}
user{'julien':
uid => 1001,
# ...
}
Is there a way to do this from Hiera?

François Beausoleil
- 761
- 2
- 9
- 21
1
vote
1 answer
Using example of Hiera NTP in puppet does not work
I am currently trying to rebuild the example described here
The Problem is, that when I try to get the ntp::servers variable I get the following error, which I have problems with understanding.
hiera ntp::servers…

syss
- 123
- 7
1
vote
1 answer
external fact not available at very first puppet run
Introduction:
We are using puppet to configure the nodes via a custom fact which is then referenced in hiera. The fact can either reside in the golden image in /etc/facter/fact.d/ or via pluginsync (makes no difference, tested both)
Versions:
dpkg…

tommics
- 111
- 1
- 11
1
vote
0 answers
need help writing puppet module for sssd.conf using Hiera
I need to build a module to manage /etc/sssd/sssd.conf on our Red Hat VMs. The sssd modules published on the forge don't seem to do what I want, nor do I feel like forking any of them.
I want to keep all the configuration data in Hiera's common.yaml…

mr.zog
- 923
- 3
- 20
- 39
1
vote
4 answers
How do I use saz-sudo puppet module to deploy my own sudoers file with hiera?
I have saz-sudo installed and have created a site_sudo module based (I hope) on it.
Here's what I have in my site_sudo/manifest/init.pp file:
class { 'site_sudo': }
sudo::conf { 'web':
source => 'puppet:///files/etc/sudoers',
}
…

mr.zog
- 923
- 3
- 20
- 39
1
vote
1 answer
Configuring puppetdb module in Puppet using Hiera
I'm trying to install the PuppetDB Module. Part of this bundles a module for installing some requisite Postgres instances which I am using as well.
We primary use heira to configure roles and set various properties.
I have the configuration far…

atxdba
- 337
- 1
- 5
- 15