Amrit, since you are deploying it as a file resource, it has to be deployed to the agent before it will be used. You could instead add the fact to your module, where plugin sync will push it to the agent before it collects facts, which means it is there on the first facts run. See https://docs.puppet.com/facter/3.1/custom_facts.html#fact-locations
On Tuesday, July 12, 2016, Amrit Atmajit <amrit.atma...@gmail.com> wrote: > Hi, > > I am using following code snippet in one of the init.pp file of puppet > master to load the updated facts in "facts.yaml" available in > "C:\marionette-collective\etc\" folder. > > > > file { "c:/marionette-collective/etc/facts.yaml": > > loglevel => debug, > > content => inline_template("<%= scope.to_hash.reject { |k,v| k.to_s > =~ /(uptime_seconds|timestamp|free)/}.to_yaml %>"), > > require => [ Exec['set_executionpolicy'], Exec['gencustomfacts'] ], > > } > > > > But, the custom facts are getting updated in facts.yaml file on execution > of next "puppet agent --test", not immediately. > > Am I missing something to update the facts.yaml for the custom facts on > the immediate execution of "puppet agent --test" not on the next execution? > > Regards > Amrit > > -- > 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 > <javascript:_e(%7B%7D,'cvml','puppet-users%2bunsubscr...@googlegroups.com');> > . > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/060a4391-03a0-4074-b322-72a7784fcab0%40googlegroups.com > <https://groups.google.com/d/msgid/puppet-users/060a4391-03a0-4074-b322-72a7784fcab0%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Rob Nelson rnels...@gmail.com -- 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/CAC76iT8%2BDHZ5zW%2BcY63yzvWfjys-9jvYa88WFrPq3Wgntt%3DycQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.