You could put that same yaml or json in /etc/puppetlabs/facter/facts.d and the whole data structure will be available under $facts ...
--eric0 On Monday, November 26, 2018 at 11:14:27 AM UTC-8, Henrik Lindberg wrote: > > On 2018-11-23 03:27, Abhijeet Rastogi wrote: > > Hi everyone, > > > > > > 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? > > > > There is a way to make it read other facts than the default getting the > facts for the node apply is running on. To use that you need to change > the facts terminus setting > https://puppet.com/docs/puppet/5.3/indirection.html#yaml-terminus-1 > > Warning: That is not easy to use. > > For puppet lookup we wanted something simpler and choose to expose the > option directly as it is a common use case to experiment with lookup CLI > and different facts. > > Suggest you file a ticket with a feature request for puppet apply. > > Best, > - henrik > > > Puppet version: 6.0.4 > > > > Thanks, > > Abhijeet > > > > -- > > 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] > > <mailto:[email protected]>. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/puppet-users/c9c7ea63-cd97-4dbc-9c45-ee78e5cb9d4b%40googlegroups.com > > > < > https://groups.google.com/d/msgid/puppet-users/c9c7ea63-cd97-4dbc-9c45-ee78e5cb9d4b%40googlegroups.com?utm_medium=email&utm_source=footer>. > > > > For more options, visit https://groups.google.com/d/optout. > > > -- > > 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/bf91272c-4872-455f-871b-bf1a23edfe83%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
