On Monday, November 26, 2018 at 12:51:57 PM UTC-6, Abhijeet Rastogi wrote: > > > puppet lookup command has a nice --facts option which accepts a > structured json/yaml file to upload files. > > Why does that option not exist for puppet apply? Is the environment > variable the only option? > >
puppet apply presumes that you want to use the facts for the local node, since that's the node to which the generated catalog will be applied. It therefore uses the same mechanism to determine the appropriate facts as the agent does, which, by default, is by running facter. puppet lookup has a different orientation. It is an alternative to a *server*-side mechanism, rather than a client-side one. Therefore, it does not assume that you want to use the facts for the current node. The --facts option provides a convenient mechanism for communicating multiple facts and structured facts to it, since it cannot rely on being fed the facts internally by the catalog builder. Other responses have already pointed out that puppet apply does afford you other alternatives, which you can access by manipulating the facts_terminus setting. You should be able to do that either in the config file or on the command line. In particular, there is a "yaml" facts terminus, though it's unclear to me how it chooses the file from which to read facts. John -- 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/a3c1406e-9266-4ea8-8ed9-da82969e1884%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.