Understanding Hiera settings and like it's working
Hello, I've recently found a structure of puppet ready and functional using hiera, but I don't know like it's working. my hiera settings: /etc/puppetlabs/code/hiera.yaml :backends: - yaml :yaml:...
View ArticleHiera 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: ---...
View Articlehiera lookup failure
Given this /etc/puppetlabs/code/hiera.yaml --- :backends: - json :hierarchy: - "%{hostname}.%{nt_environment}.%{nt_location}" - "%{nt_type}.%{nt_environment}.%{nt_location}" -...
View ArticleHiera with masterless Puppet - how to extract data from available facts?
I'd need to infer some information from available facts, e.g. given a hostname like `dev-london1-server0`, available as fact to hiera, I would like to extract the environment (`dev`), the datacenter...
View ArticleHiera variables help
can someone help me with including hiera variables where I donot have to repeat the "%{hiera('')}" and class:: every time file1.yaml class::param1: "valuees1" class::param2:...
View ArticleAccess hiera array element in erb template
So, I have check_command check_nrpe!check_ntp_drift!<%= env['ntpservers'][0] %> in a template .erb file. This gives the error Function Call, Failed to parse template...
View ArticleHiera interpolation
Hi. I have a hiera hash like this: profiles::microservices::filesystems: rootvg: physical_volumes: - /dev/sda2 logical_volumes: service_bin: size: 1G mountpath: /apps/lvservices fs_type : xfs...
View ArticleCatalog applies after restarting puppetserver service only
Hello! I recently configured a new puppet 4.5.2 environment in my company. I connected an hiera using couchdb to manage my hierarchy. Now, when im running 'puppet agent -t' in any node (even in the...
View Articleiteration and repetition through hiera hashes in puppet 2016.1
HI All i've defined a hash like so: ms::group: msmdxgrp: gid: 1203 and i'm trying to create a generic profiles which will create a unix group from that. i'm trying to prize myself away from...
View Articlehiera_hash Cannot reassign variable '$network' in site.pp
site.pp $mysql = hiera_hash(mysql) $network = hiera_hash(network) $nfs = hiera_hash(nfs) default.json "mysql" : {}, "network" : {}, "nfs" : {}, This gives Cannot reassign variable '$network' at...
View ArticleSome questions about r10k with hiera
Hi all! I newbie in use puppet + hiera + r10k and i have some questions: 1) *Double declarations*. For example, i have 2 hiera files: **puppet.local.yaml** and **common.yaml** . In both i write...
View ArticleHow to call hiera in a class definition?
I am facing an issue in calling a hiera key with in a class.. I am playing with hiera to learn how it works and so the idea is to create set of users and groups. My class looks like the following....
View Articleiterate through consul items in hiera
I have the consul backend as follows: application/ESC/DeploymentDemo/ESC-DeploymentDemo-trunk/web/database_model The hierarchy in the database_model should be something as follows:...
View Articlehiera lookups in hiera
Hello all. I have this defined in one hiera file: application::user: someusername: uid: 3428 managehome: true comment: Application User shell: /bin/bash gid: 1203 and in another hiera file i have...
View Articleregex in hiera lookup
Can we use regex in hiera lookup? I want to get the data from the hiera lookup which looks like this: db_model = hiera('database_model/datasource1',[]) db_model =...
View Articlehash lookup in template using scope function
Hi, I want am using following code for hiera lookup which is working fine. YAML --- appname: 'tomcat' Template --- appname: <%= scope().call_function('hiera',['appname'])%> But, now I have values...
View ArticleHow can I collect values from Hiera in a hash.
I have wrapper class that I want to use to set up a nginx server, as well as set up firewall ports and selinux ruls. So I have for example this in my hiera data: my_nginx::vhosts: localhost_8081:...
View ArticleWhat is the convention/best practice store the database related information
I would like to know the convention/best practice that is followed in the puppet managed projects for storing database information. Do you store it in YAML/JSON to be called in hiera or in Consul? How...
View Articlepuppetlabs-rabbitmq: multiple routing keys for same binding
How can I create 2 bindings between the same exchange / queue, but with multiple routing keys? This is legal and works when setup manually. I am using create_resources after pulling the bindings from...
View ArticleUsing hiera data in tagmail.conf
Is it possible to use values from hiera variables in the tagmail.conf for mail address instead of hard coding them in tagmail.conf? Basically I want to know if we can do something like this:...
View Article