On 27 Jul 2014 16:42, "Pete Brown" <[email protected]> wrote:
>
> I have taken to using hiera as my ENC these days.
>
> My site.pp is basically
> hiera_Include(role)
> And each nide as a role variable set in my certname.yaml file.

Dammit.
Each node has a role variable.

> Hiera basically does the same as most ENCs anyway and it's nice having
roles and node data in one location.
>
> On 25 Jul 2014 14:33, "Atom Powers" <[email protected]> wrote:
>>
>> The ENC can pass on any variable you wish to define and they can be used
by Hiera.
>> I haven't got around to implementing a true CMDB yet so I use a very
simple ruby script as my ENC. It reads the hieradata/nodes/fqdn.yaml file
for a "role" value and returns that in the output to puppet. My hiera.yaml
hierarchy includes "hieradata/roles/%role"
>> The output of the ENC is very specific, if you can't find the
information you need to get it to work I'll find out if I can share my ENC
script with you off-list.
>>
>>
>> On Thu, Jul 24, 2014 at 9:23 PM, Grant Street <[email protected]>
wrote:
>>>
>>> Hey
>>> Thanks for the reply
>>>
>>> I want the ENC to pass on variables or the like so that these can be
used by hiera to apply roles/profiles etc.
>>>
>>> eg
>>> ENC returns a nodes software role eg role: desktop_software
>>> Then hiera can load the desktop_software.yaml file to apply that
software role as part of it's normal hierarchy.
>>>
>>> Is that possible? What would it envolve?
>>>
>>> Grant
>>>
>>>
>>> On Friday, July 25, 2014 1:34:10 AM UTC+10, Atom Powers wrote:
>>>>
>>>> Grant,
>>>>
>>>> You probably want to use an ENC, which will allow you to define any
fact from a specified datasource.
>>>> In a simple implementation I use an ENC to read the node's hiera file
and output a few facts, such as a node's role/group, which are then used by
hiera to define additional information for Puppet.
>>>>
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
Groups "Puppet Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
>>> To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/e811237c-edfc-4eb3-b19a-af4f6e182f8b%40googlegroups.com
.
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>>
>> --
>> Perfection is just a word I use occasionally with mustard.
>> --Atom Powers--
>>
>> --
>> You received this message because you are subscribed to the Google
Groups "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
>> To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/CAF-H%3DO%3DfKbZcWyxwxSQwPX_YdwUi%2BuT9RLrUchOK0x2CuaA8ug%40mail.gmail.com
.
>> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAJ8DPF5C4jMvt-YVBqd3pFzJ%2BcEGwtZ7W74JZGkuqRi_j%3Dj8SQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to