Done some more reading.

I'm have a  master puppet server

I had thought to use hiera. seems like i need to setup 
ENC https://docs.puppet.com/guides/external_nodes.html

Alex

On Wednesday, 22 June 2016 10:39:34 UTC+10, Rob Nelson wrote:
>
> Typically, you wouldn't actually classify or assign environment via hiera. 
> That's a value provided to the master during checkin, either as a CLI 
> argument or in puppet.conf. You could, of course, manage that file and 
> provide an environment value through hiera. But that would change the 
> environment used on next run, not the current run.
>
> If you're in a master less environment, you could do some magic with hiera 
> cli/puppet lookup to find a value for the environment then call puppet 
> apply with that environment, but that seems a bit needlessly complex at 
> that point.
>
> You would typically use hiera to classify the node and assign the classes 
> it receives, though. That would be done with hiera_include('some_key'), 
> where somekey is found in your hierarchy with the proper value. 
>
> On Tuesday, June 21, 2016, Alex Samad <al...@samad.com.au <javascript:>> 
> wrote:
>
>> Hi
>>
>> I have a greenfield install. Centos 6.x puppet opensource latest. 
>>  installed r10k.
>>
>> I have setup my git repo, used the control repo as a starting spot.
>>
>> now I am getting my head around hiera 
>>
>> Looking at this https://docs.puppet.com/hiera/3.1/complete_example.html 
>>  I understand the way that works for each environment.
>>
>> But how do I use hiera to allocate nodes to environments ?
>>
>> for example can I classify by name regex, so all hosts with name 
>> ".*prod.*" is in production and ".*inf.*" into inf environment 
>> can I also classify by ip address ?
>>
>> -- 
>> 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 puppet-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/8236b18c-2b1c-4733-a744-7dbeb281784c%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/puppet-users/8236b18c-2b1c-4733-a744-7dbeb281784c%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> -- 
>
> Rob Nelson
> rnel...@gmail.com <javascript:>
>
>

-- 
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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/168019ef-d060-4881-bc6f-5b4dbb12d114%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to