[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 ("TESTKEY=$testkey[ec2_pvdisks_

Re: [Puppet Users] Hiera to hash

2012-08-21 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. > > M

Re: [Puppet Users] Hiera to hash

2012-08-21 Thread Douglas Garstang
On Tue, Aug 21, 2012 at 11:19 PM, Stephen Gran 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: >> disks: /de

Re: [Puppet Users] Hiera to hash

2012-08-21 Thread Douglas Garstang
On Tue, Aug 21, 2012 at 11:44 PM, Douglas Garstang wrote: > On Tue, Aug 21, 2012 at 11:19 PM, Stephen Gran > 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 fi

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Douglas Garstang
On Tue, Aug 21, 2012 at 11:51 PM, Douglas Garstang wrote: > On Tue, Aug 21, 2012 at 11:44 PM, Douglas Garstang > wrote: >> On Tue, Aug 21, 2012 at 11:19 PM, Stephen Gran >> wrote: >>> Hi, >>> >>> On Tue, 2012-08-21 at 21:00 -0700, Douglas Garstang wrote: I know I did this once before but ca

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Douglas Garstang
On Wed, Aug 22, 2012 at 11:08 AM, Douglas Garstang wrote: > On Tue, Aug 21, 2012 at 11:51 PM, Douglas Garstang > wrote: >> On Tue, Aug 21, 2012 at 11:44 PM, Douglas Garstang >> wrote: >>> On Tue, Aug 21, 2012 at 11:19 PM, Stephen Gran >>> wrote: Hi, On Tue, 2012-08-21 at 21:00 -0

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Justin Stoller
On Wed, Aug 22, 2012 at 1:34 PM, Douglas Garstang wrote: > On Wed, Aug 22, 2012 at 11:08 AM, Douglas Garstang > wrote: >> On Tue, Aug 21, 2012 at 11:51 PM, Douglas Garstang >> wrote: >>> On Tue, Aug 21, 2012 at 11:44 PM, Douglas Garstang >>> wrote: On Tue, Aug 21, 2012 at 11:19 PM, Stephen

Re: [Puppet Users] Hiera to hash

2012-08-22 Thread Douglas Garstang
On Wed, Aug 22, 2012 at 1:43 PM, Justin Stoller wrote: > On Wed, Aug 22, 2012 at 1:34 PM, Douglas Garstang > wrote: >> On Wed, Aug 22, 2012 at 11:08 AM, Douglas Garstang >> wrote: >>> On Tue, Aug 21, 2012 at 11:51 PM, Douglas Garstang >>> wrote: On Tue, Aug 21, 2012 at 11:44 PM, Douglas Ga

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 wrote: > On Wed, Aug 22, 2012 at 1:43 PM, Justin Stoller wrote: >> On Wed, Aug 22, 2012 at 1:34 PM, Douglas Garstang >> wrote: >>> On Wed, Aug 22, 2012 at 11:08 AM, Douglas Garstang >>> wrote: On Tue, Aug 21, 2012 at 11:51 PM, Douglas Garst

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 = $ec2_config['instance'][$::ec2_i