Re: [Puppet Users] Simple hiera-puppet usage

2012-03-20 Thread Gary Larizza
On Tue, Mar 20, 2012 at 9:32 PM, Pablo Fernandez wrote: > ** > > Thanks for the hint! > > > > Let me ask you a couple of questions: > > - Does the "puppetbackend::data" have to be imported by the node? > No, not if you're using Hiera. It just needs to be named appropriately and placed in the cor

Re: [Puppet Users] Simple hiera-puppet usage

2012-03-20 Thread Pablo Fernandez
Thanks for the hint! Let me ask you a couple of questions: - Does the "puppetbackend::data" have to be imported by the node? - Is the name static, or can I name it "myclass::mydata", and use ":datasource: mydata"? - When you call hiera() inside the module, does it go to other modules to search f

Re: [Puppet Users] Simple hiera-puppet usage

2012-03-16 Thread Gary Larizza
Hi Pablo, The Puppet backend accepts a 'datasource' parameter whose value will be the class name for where it will look for Puppet variables. Take my hiera.yaml for example: --- :backends: - puppet :puppet: :datasource: data I'm telling it to look for a ::data class, and to check within

[Puppet Users] Simple hiera-puppet usage

2012-03-16 Thread Pablo Fernandez
Hi all, I am trying to understand how does hiera puppet backend work, so I created the following example: hiera.yaml has only: --- :backends: - puppet --- And the node: node 'testnode' { $variable = 'kk' $thing = hiera ("variable") notify { "note: $thing": } } I d