'Kimo Rosenbaum' via Puppet Users
2014-Oct-23 05:43 UTC
[Puppet Users] Best way to do custom facts based on 3rd party data
Hello,
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).
I know I can use custom facts on the client itself but I'd like to keep it
on the master so I don't have to worry about credentials on all nodes,
nodes not having access to the source (not having a route to the API, etc),
nodes being able to "change" their role, etc.
The main use for this fact is in hiera:
hiera.yaml:
:hierarchy:
- nodes/%{::clientcert}
...
- roles/%{::role}
...
common
Any suggestions?
Thanks
Kimo
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/4c98a162-e304-40b8-be11-4a217fdb52ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.