Is it possible to write Puppet facts into host_parameters?
Facter is collecting some information on client side which I need in host_parameters.
So every host has for example the fact category with a value. I want to write this information into a host_parameter in general and regularly.
Also It would make sense to have a specific fact in the comments field of a hosts (since the fact is some kind of description for what the host is used). Is it the same approach?
It does assume you know ERB (see https://www.stuartellis.name/articles/erb/ if not). Template variables does document how it generally can be used (as I wrote above) but TemplateWriting documents the actual data structures you can use in ERB. The actual content is rendered with live data and not pre-calculated/cached. As long as the parameter is present on a host (and for global that’s every single host), it’s used.
Our documentation can certainly use some improvement.
@ekohl
Still one question. The host API does not show the value in my case. It’s showing the ERB template. Which endpoint do you mean? Or is it maybe a versioning issue since you use the nightly?
The parameters there are meant for modification. /api/hosts/ID/enc is meant for consumption. That does make me realize another limitation in the current Ansible inventory.