On Jul 15, 2014, at 10:10 AM, Maxim Nikolaev <m...@maximnik.com> wrote:
> Hello > > I have strange experience with facter on newly installed servers. > > Puppet: 3.6.2 > Facter: 2.1.0 > OS: Amazon Linux > > when I set custom fact to /etc/facter/facts.d and run facter locally I get > following error > Fact file /etc/facter/facts.d/services.rb was parsed but returned an empty > data set > > > When I copy same file to > /usr/lib/ruby/site_ruby/1.8/facter/ > and run same command - facter works ok. > > > Can someone advise why thi can happen? When using external facts -- those placed into /etc/facter/facts.d -- on linux, you can use either structured data (yaml, json, or txt), or executable files (shell/ruby/python/perl/etc) to generate facts, but the content/output of these executable files must be in 'key=value'. If you are unable to run '/etc/facter/facts.d/services.rb' directly from the terminal and have it generate STDOUT in the form of 'factname=factvalue' then you must modify it so that it does. Check that you have a shebang line (like '#!/usr/bin/env ruby') at the top and that the file is executable. -- Peter Bukowinski -- 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/52582ED6-48CD-44F6-BEAA-A1C9E7A2BBA4%40gmail.com. For more options, visit https://groups.google.com/d/optout.