[Puppet Users] hiera deep hash merges broken

2017-02-14 Thread Daniel Urist
To get deep hash merges in hiera, I have been using the following in my hiera.yaml: > --- > :merge_behavior: deeper > :backends: > - eyaml And in one of my classes, a call to hiera_hash() like this: $if_merged = hiera_hash('profiles::pserver::interfaces') However, with puppetserver

[Puppet Users] Hiera / YAML Hash question

2014-05-29 Thread Christopher Fitchett
Hi, I have a YAML file constructed like this: servers: server1: host: 1.1.1.1 node: 1 server2: host: 1.1.1.2 node: 2 I have an erb template that needs the node id where the it address belongs to the machine it is running on. Is there a way in ruby to select

Re: [Puppet Users] Hiera / YAML Hash question

2014-05-29 Thread Christopher Wood
Sounds like you want @servers[@hostname]['node'] ? If you want to match on the ip address that sounds like you'd have to loop over it or build an ip=hostname mapping. http://docs.puppetlabs.com/guides/templating.html#referencing-variables On Thu, May 29, 2014 at 08:08:53AM -0700, Christopher

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Stephen Gran
Hi, On Tue, 2012-08-21 at 21:00 -0700, Douglas Garstang wrote: I know I did this once before but can't find docs on how to do it again. I have this in a yaml file: pvdisks: ec2_pvdisks_m1.small: disks: /dev/xvdb1 enabled: yes Loading it with hiera. Manifest

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Douglas Garstang
On Tue, Aug 21, 2012 at 11:19 PM, Stephen Gran stephen.g...@guardian.co.uk wrote: Hi, On Tue, 2012-08-21 at 21:00 -0700, Douglas Garstang wrote: I know I did this once before but can't find docs on how to do it again. I have this in a yaml file: pvdisks: ec2_pvdisks_m1.small:

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Douglas Garstang
On Tue, Aug 21, 2012 at 11:44 PM, Douglas Garstang doug.garst...@gmail.com wrote: On Tue, Aug 21, 2012 at 11:19 PM, Stephen Gran stephen.g...@guardian.co.uk wrote: Hi, On Tue, 2012-08-21 at 21:00 -0700, Douglas Garstang wrote: I know I did this once before but can't find docs on how to do it

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Douglas Garstang
On Tue, Aug 21, 2012 at 11:51 PM, Douglas Garstang doug.garst...@gmail.com wrote: On Tue, Aug 21, 2012 at 11:44 PM, Douglas Garstang doug.garst...@gmail.com wrote: On Tue, Aug 21, 2012 at 11:19 PM, Stephen Gran stephen.g...@guardian.co.uk wrote: Hi, On Tue, 2012-08-21 at 21:00 -0700,

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Douglas Garstang
On Wed, Aug 22, 2012 at 11:08 AM, Douglas Garstang doug.garst...@gmail.com wrote: On Tue, Aug 21, 2012 at 11:51 PM, Douglas Garstang doug.garst...@gmail.com wrote: On Tue, Aug 21, 2012 at 11:44 PM, Douglas Garstang doug.garst...@gmail.com wrote: On Tue, Aug 21, 2012 at 11:19 PM, Stephen Gran

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Justin Stoller
On Wed, Aug 22, 2012 at 1:34 PM, Douglas Garstang doug.garst...@gmail.com wrote: On Wed, Aug 22, 2012 at 11:08 AM, Douglas Garstang doug.garst...@gmail.com wrote: On Tue, Aug 21, 2012 at 11:51 PM, Douglas Garstang doug.garst...@gmail.com wrote: On Tue, Aug 21, 2012 at 11:44 PM, Douglas

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Douglas Garstang
On Wed, Aug 22, 2012 at 1:43 PM, Justin Stoller jus...@puppetlabs.com wrote: On Wed, Aug 22, 2012 at 1:34 PM, Douglas Garstang doug.garst...@gmail.com wrote: On Wed, Aug 22, 2012 at 11:08 AM, Douglas Garstang doug.garst...@gmail.com wrote: On Tue, Aug 21, 2012 at 11:51 PM, Douglas Garstang

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Wolf Noble
I accomplished something similar awhile back. While I've not spent much time looking at your particular problem, I think this'll help point you in the direction of what you need… class mymodule::params{ $collector= hiera('mymodule_collector','') } class mymodule::config{ $collector

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Douglas Garstang
On Wed, Aug 22, 2012 at 1:52 PM, Douglas Garstang doug.garst...@gmail.com wrote: On Wed, Aug 22, 2012 at 1:43 PM, Justin Stoller jus...@puppetlabs.com wrote: On Wed, Aug 22, 2012 at 1:34 PM, Douglas Garstang doug.garst...@gmail.com wrote: On Wed, Aug 22, 2012 at 11:08 AM, Douglas Garstang

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Douglas Garstang
This in insanity. Now I have: $ec2_config = hiera('ec2_config') if $::ec2_instance_id { $pvdisks = $ec2_config['instance'][$::ec2_instance_type]['pvdisks'] $pvdisk_count = inline_template('%= @pvdisks.length %') $swapvol_enabled =

[Puppet Users] Hiera to hash

2012-08-21 Thread Douglas Garstang
I know I did this once before but can't find docs on how to do it again. I have this in a yaml file: pvdisks: ec2_pvdisks_m1.small: disks: /dev/xvdb1 enabled: yes Loading it with hiera. Manifest has: $testkey = hiera('pvdisks') notice