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.

learn more… | top users | synonyms

-1
votes
0answers
31 views

How to use hash with templates (puppet) [on hold]

I'm trying to create several files (based on a template) using hash and hiera. I would like to create 2 files (test1 and test2) and send test1(a,b,c) values in the file test1 and test2(a,b,c) values ...
5
votes
1answer
43 views

What is the equivalent of using hiera as an ENC in Ansible?

I use hiera as an External Node Classifier in Puppet in order to avoid that roles are deployed on nodes that are for example incompatible. Now I have two servers that are provisioned using Ansible. I ...
1
vote
1answer
33 views

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 ...
0
votes
0answers
27 views

Hiera hash or array error

I developed an AWS S3 bakcup modul, but after the latest modify, puppet client not running (for run I using a following command: puppet agent --no-daemonize --debug --onetime). My hiera.yaml: --- :...
0
votes
0answers
28 views

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. ...
1
vote
0answers
60 views

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: "%{::...
0
votes
1answer
29 views

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 --...
1
vote
0answers
31 views

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] ...
1
vote
1answer
56 views

Vagrant Puppet apply manifest with wrong environment

I use Puppet 3.7 in standard client-server mode, with environments, and using Hiera for data. I use Vagrant to test the Puppet manifests directly from my Puppet repository. I recently started to use ...
-2
votes
1answer
48 views

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('...
1
vote
1answer
106 views

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}/%{...
2
votes
1answer
148 views

how to create array of arrays from hiera in puppet

I have a situation where I have to generate array of arrays which are declared in hiera in puppet at different hierarchies. Lets say at environment level I have a declaration test: - [a,b,c,d] - ...
0
votes
1answer
48 views

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': ...
0
votes
0answers
147 views

Puppet server not picking up node's hiera facts

I am trying to make a simple configuration in puppet. The idea is that a machine reports the type of data it wants and puppet supplies the configuration. I am using Puppet 4.2 and the example below ...
0
votes
1answer
33 views

How to reference a heira variable from elsewhere the heirarchy?

So suppose in a very specific hiera yaml file I define a variable, such as "env_name". env_name: "dev-unstable" Now in a more general hiera file I'd like to interpolate that variable into a ...
3
votes
1answer
160 views

How do I run hiera standalone to test values?

Presumably on my puppet master I can run hiera from the command line to see how a particular node would generate a variable set, but it's really hard to find a working example of that. I've tried ...
0
votes
1answer
49 views

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 ...
0
votes
1answer
385 views

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 ...
0
votes
1answer
240 views

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 ...
0
votes
0answers
80 views

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 ...
1
vote
2answers
476 views

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 ...
3
votes
1answer
581 views

Satellite 6's puppet is unable to find the hiera data sources

Using Satellite 6 which comes with Foreman 1.6.0.53. By default, Puppetlabs' documentation states that hiera configuration should be in $config/hiera.yaml. # puppet config print confdir hiera_config ...
1
vote
0answers
1k views

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 ...
1
vote
2answers
819 views

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 ...
-3
votes
1answer
467 views

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: ...
0
votes
1answer
1k views

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 ...
1
vote
1answer
475 views

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 ...
0
votes
1answer
3k views

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 ...
1
vote
1answer
316 views

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 => ...
4
votes
1answer
2k views

Trouble using hiera in masterless setup and getting values set for classes

I am running a masterless puppet setup that applies the puppet changes in the following manner. puppet apply /tmp/puppet/manifests/site.pp --modulepath=/tmp/puppet/modules --hiera_config=/tmp/puppet/...
0
votes
1answer
263 views

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-...
1
vote
1answer
596 views

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. ...
-1
votes
2answers
443 views

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? ...
1
vote
1answer
856 views

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 (...
1
vote
0answers
408 views

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 ...
0
votes
2answers
157 views

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 ...
0
votes
1answer
97 views

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 ...
0
votes
1answer
69 views

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 ...
0
votes
1answer
621 views

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 ...
1
vote
4answers
977 views

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': ...
9
votes
4answers
7k views

How to set up :datadir: when using Hiera with Puppet and Vagrant

I'd like to know how to set up :datadir: in hiera.yaml for optimal usage with Puppet and Vagrant. Currently I'm using vagrant 1.5.0 with virtualbox 4.2 on Ubuntu 13.10 with an Ubuntu 12.04 guest ...
0
votes
1answer
3k views

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 ...
3
votes
1answer
860 views

Different hiera hierarchy per dynamic environment

Is it possible to define a separate hiera.yaml for a given environment? Currently I am using dynamic environments. Each one has its own hiera data directory, per my hiera.yaml file. :yaml: :...
4
votes
1answer
187 views

Puppet reporting without master

I am planning a Puppet infrastructure for about 100-200 servers. This is the design so far: Stash (git) for storing puppet config (not planning on using a master). Hiera to query either yaml, json, ...
3
votes
2answers
600 views

Manage enable - disable nginx site by Hiera puppet?

i got the task to implement hiera puppet script to manage sites_enabled for nginx. Here is my puppet script: common.yaml --- classes: - nginx nginx: enabled: abc.com xyz....
0
votes
1answer
1k views

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 ...
4
votes
4answers
3k views

hiera_include equivalent for resource types

I'm using the yumrepo built-in type. I can get a basic integration to hiera working yumrepo { hiera('yumrepo::name') : metadata_expire => hiera('yumrepo::metadata_expire'), descr ...
1
vote
1answer
412 views

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 ...
1
vote
1answer
1k views

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'...
4
votes
1answer
535 views

hiera data source in using puppet syntax?

The documentation for hiera on docs.puppetlabs.com seems to give me the impression that I can use puppet syntax to describe my data. Or posssibly will be able to in the future. See: Coming soon. Is ...