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
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
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
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
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
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!
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
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!