Re: [Puppet Users] Where do custom facter facts go on the Learning VM ? Is that the cause of these behaviors?

2014-01-09 Thread Shark Laser
Thank you Andrew and Johan. Andrew's suggestion made the fact work with Facter when run alone (outside of Puppet) such as "facter --debug" -- the value of my new hello fact shows up in the output now Johan's suggestion got it working when I run Puppet from the commandline. If I do "puppet a

Re: [Puppet Users] Where do custom facter facts go on the Learning VM ? Is that the cause of these behaviors?

2014-01-09 Thread Johan De Wit
The facts should go into : /etc/puppetlabs/puppets/module/hello/lib/facter/ if you do a puppet agent -t, it will deployed in the right place by puppet. you can also do a 'puppet plugin download' hope this helps On 01/08/2014 10:52 PM, Shark Laser wrote: Platform: I've downloaded and inst

Re: [Puppet Users] Where do custom facter facts go on the Learning VM ? Is that the cause of these behaviors?

2014-01-08 Thread Andrey Kozichev
i think everything is fine with your code. Problem might be with location. Dont know about PE, but for facter if you do export FACTERLIB= , then you can run facter to see your custom fact On 8 Jan 2014 21:52, "Shark Laser" wrote: > > Platform: I've downloaded and installed the learning VM. T

Re: [Puppet Users] Where do custom facter facts go on the Learning VM ? Is that the cause of these behaviors?

2014-01-08 Thread Nathan Valentine
The Facter.add scaffolding isn't required for external facts. That's actually a key part of the design. Here's an example vagrant environment with external facts similar to your demo code: https://github.com/nrvale0/vagrant-extfacts-demo On Wed, Jan 8, 2014 at 5:03 PM, Shark Laser wrote: > The

Re: [Puppet Users] Where do custom facter facts go on the Learning VM ? Is that the cause of these behaviors?

2014-01-08 Thread Shark Laser
The simpler ruby script you gave still exhibits the same behavior. I'm sure the code in the facts I am using is correct, so I don't think it is a matter of their content. As I mentioned I have literally copied examples from the tutorial and elsewhere. If I run facter --debug all of the fa

Re: [Puppet Users] Where do custom facter facts go on the Learning VM ? Is that the cause of these behaviors?

2014-01-08 Thread Nathan Valentine
sorry, s/=/:/g in hello.yaml On Wed, Jan 8, 2014 at 4:40 PM, Nathan Valentine wrote: > You are making external facts too complicated. More like this: > > > hello.rb > --- > #!/usr/bin/env ruby > puts "hello=Hello, World!" > > > hello.yaml > --- > --- > hello='Hello, World!

Re: [Puppet Users] Where do custom facter facts go on the Learning VM ? Is that the cause of these behaviors?

2014-01-08 Thread Nathan Valentine
You are making external facts too complicated. More like this: hello.rb --- #!/usr/bin/env ruby puts "hello=Hello, World!" hello.yaml --- --- hello='Hello, World!' https://docs.puppetlabs.com/guides/custom_facts.html#external-facts -- --- Nathan Valentine, Puppet La

[Puppet Users] Where do custom facter facts go on the Learning VM ? Is that the cause of these behaviors?

2014-01-08 Thread Shark Laser
Platform: I've downloaded and installed the learning VM. This system runs CentOS with Facter v1.7.3 and Puppet v3.3.1 (Puppet Enterprise 3.1.0). I've created a fact called hello.rb with the following content: Facter.add(:hello) do setcode do "Hello world!