Jo Rhett wrote: > Well the exact answer to your question is: > > lookup("roles::${category}::${class}::classes", Array, > 'unique').include() > > However, the code you've shown is implementing a hierarchy for class > assignment duplicative of the Hiera hierarchy. Why not use Hiera's > hierarchy to your advantage? > > hiera.yaml: > hierarchy: > - name: "Role data" > path: "roles/%{facts.category}.yaml" > > Then have an array named classes, and just use > > lookup('classes', Array, 'unique').include() > > Much easier. Don't make your own hierarchy, make use of Hiera.
What is the difference / advantage of hierarchy: - name: "Role data" path: "roles/%{facts.category}.yaml" and hierarchy: name: "Role data" path: "roles/%{facts.category}.yaml" -- 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/xn0ldqofkfp40e001%40news.gmane.org. For more options, visit https://groups.google.com/d/optout.