It's important to keep in mind that Hiera is "just data". You
still need to actually create the resources somehow in your
manifest based on that data.
Thus, creating a data element called "classes" in Hiera isn't enough to actually get those classes applied to the node. You need to add hiera_include('classes') in your manifest. More info here: https://docs.puppet.com/hiera/3.1/puppet.html#assigning-classes-to-nodes-with-hiera-hierainclude
Having said that, until you get more experience with Puppet I would recommend avoiding using Hiera to assign classes to nodes. It can be harder to debug and maintain, and breaks the rule of thumb that Hiera should only contain configuration data and not class structure. You may want to look into the "roles and profiles" model instead. There ARE valid reasons to assign classes via Hiera (e.g. assigning a role to the node based on the output of a custom Hiera backend) but this wouldn't be the approach I recommend to a newbie. :)--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/a7bb4a4b-d61b-4db0-bdff-57030d75cb51%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAJ%2BQ1PUt6kDMRVveYmZwcYHMmVySK0i05Fed%2BPkY2H-pTrmmTA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
>>> email to puppet-users+unsubscribe@googlegroups.com.
>>> To view this discussion on the web visit
>>>
>>> https://groups.google.com/d/msgid/puppet-users/a7bb4a4b-d61b-4db0-bdff-57030d75cb51%40googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Puppet Users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/puppet-users/OAtIhSwbyEs/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> To view this discussion on the web visit
>>>
>>> https://groups.google.com/d/msgid/puppet-users/cb352a0f-20a3-c79c-ada2-fe717850ebff%40alter3d.ca.
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Puppet Users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/puppet-users/OAtIhSwbyEs/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
Incase somebody googles to herei found thispuppet apply --certname=<abc> -e "notice(hiera('classes'))" --noop --verboseThis shows me what the puppet master is giving as classes for a specific node based on certname.
alsohiera -d classes ::osfamily=RedHat environment=production ::trusted.certname=<abc>on the puppet master to give you info from hiera .. helpful