Hi Kimo > > I'm using puppet enterprise 3 with hiera and roles/profiles. I'm trying > to find a good way to handle some facts (namely role) being generated on > the master and sourced based on the underlying hypervisor. I.e., if the > node is running on EC2 then the role would be from a tag, for vSphere > the role would come from either a tag or custom attribute, etc, and a > fallback would be to just take the first part of the hostname minus any > number (e.g., web1.colo.domain.com would be web).
You can define $role in site.pp (manifests/site.pp) of your environment. if defined outside the "node" definitions, it will be a top-scope variable. You can make decisions based on facts and set $role accordingly your needs. https://docs.puppetlabs.com/pe/latest/ puppet_assign_configurations.html#assigning-configuration-data-with-the- site-manifest-sitepp - Thomas -- 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/m2a8sv%24knt%241%40ger.gmane.org. For more options, visit https://groups.google.com/d/optout.
