Hi Experts, Sorry for re-posting but I wasn''t able to get a definite answer. I noticed there was an issue opened about this (And some posts). https://projects.puppetlabs.com/issues/3646 Just wondering what is the best way today to pass facts to puppet master --compile? As suggested in the ticket above, puppet master —compile ${client_fqdn} —factsfile ${file_full_of_facts} will be great! Thanks a lot! -Yushu +-------------------------------------------------+ | Yushu Yao | Ph:1-510-486-4690 | | Lawrence Berkeley National Lab | 1 Cyclotron Road | Berkeley CA 94720 - USA +-------------------------------------------------+ -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On May 31, 2011, at 4:31 PM, Yushu Yao wrote:> Hi Experts, > > Sorry for re-posting but I wasn''t able to get a definite answer. > > I noticed there was an issue opened about this (And some posts). https://projects.puppetlabs.com/issues/3646 > > Just wondering what is the best way today to pass facts to puppet master --compile? > > As suggested in the ticket above, puppet master —compile ${client_fqdn} —factsfile ${file_full_of_facts} will be great!I know that the master will cache the facts for clients at "/var/lib/puppet/yaml/facts". What if you pre-populate the facts cache on the master? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Tue, May 31, 2011 at 4:31 PM, Yushu Yao <yyao@lbl.gov> wrote:> Hi Experts, > > Sorry for re-posting but I wasn''t able to get a definite answer. > > I noticed there was an issue opened about this (And some posts). > https://projects.puppetlabs.com/issues/3646 > > Just wondering what is the best way today to pass facts to puppet master > --compile?Supply the client yaml facts in $vardir/yaml/ directory, matching the client certname. facter --yaml output isn''t actually valid, this script should generate the right data from the agent: #!/usr/bin/env ruby require ''puppet'' result = Puppet::Node::Facts.new(Puppet[:certname].to_s, Facter.to_hash) result.add_local_facts result.stringify result.downcase_if_necessary puts result.to_yaml Thanks, Nan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
*Thanks a lot Nan! I''ll give it a try! And let the list know if it works. -Yushu *+-------------------------------------------------+ | Yushu Yao | Ph:1-510-486-4690 | | Lawrence Berkeley National Lab | 1 Cyclotron Road | Berkeley CA 94720 - USA +-------------------------------------------------+ On Tue, May 31, 2011 at 5:41 PM, Nan Liu <nan@puppetlabs.com> wrote:> On Tue, May 31, 2011 at 4:31 PM, Yushu Yao <yyao@lbl.gov> wrote: > > Hi Experts, > > > > Sorry for re-posting but I wasn''t able to get a definite answer. > > > > I noticed there was an issue opened about this (And some posts). > > https://projects.puppetlabs.com/issues/3646 > > > > Just wondering what is the best way today to pass facts to puppet master > > --compile? > > Supply the client yaml facts in $vardir/yaml/ directory, matching the > client certname. > > facter --yaml output isn''t actually valid, this script should generate > the right data from the agent: > > #!/usr/bin/env ruby > > require ''puppet'' > result = Puppet::Node::Facts.new(Puppet[:certname].to_s, Facter.to_hash) > result.add_local_facts > result.stringify > result.downcase_if_necessary > puts result.to_yaml > > Thanks, > > Nan > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.