On 25/01/17 20:20, Sans wrote:
On Wednesday, January 25, 2017 at 7:05:03 PM UTC, R.I. Pienaar wrote: only if you enable structured facts and have a new facter Well, it's not "structured" i.e. it returns only a string. and didn't work as expected. It also an "external fact", not sure if that's the main issue. Facter.value() works fine with other fact, like "hostname" etc.
Do not ever reference Facter directly on the master side from functions or ERB templates used when compiling. Only reference Facter in logic that implements facts. It should be safe to reference Facter on the agent side in provider logic.
If you have been advised to use Facter directly in templates I would like to know where that advice came from.
You want to reference @facts['factname'] in an ERB if you are on a modern puppet, otherwise individual top scope variables.
- henrik -- Visit my Blog "Puppet on the Edge" http://puppet-on-the-edge.blogspot.se/ -- 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/88bb5bc6-bb64-e8e2-80b6-97fa6b2a81db%40puppet.com. For more options, visit https://groups.google.com/d/optout.