On Tue, Nov 17, 2015 at 6:24 PM, Peter Huene <[email protected]>
wrote:

> Hi Guto,
> On Nov 17, 2015 6:19 PM, "Guto Carvalho" <[email protected]> wrote:
> >
> > Hi guys,
> >
> > I'm playing around with custom facts, I'm trying to create a simple
> custom (structured) fact.
> >
> > [root@centos7 ~]# puppet --version
> > 4.2.1
> >
> > [root@centos7 ~]# facter --version
> > 3.0.2 (commit 5dc120fa9db4c19150466b1bbd1d0cf42c87c6bd)
> >
> > Here is my code
> >
> > https://gist.github.com/gutocarvalho/d60987f4cee423d017c4
> >
> > The fact is almost working
> >
> > root@centos7 ~]# facter -p postgresql
> > {
> >   installed => true,
> >   version => "9.2.13"
> > }
> >
> > When I try to print the fact value using notify it works fine
> >
> > notify { "PostgreSQL version is ${::postgresql['version']}":
> >
> > info: Applying configuration version '1447812110'
> > Notice: PostgreSQL version is 9.2.13
> > Notice: /Stage[main]/Main/Node[centos7.puppet]/Notify[PostgreSQL version
> is 9.2.13]/message: defined 'message' as 'PostgreSQL version is 9.2.13'
> >
> > But, when I try to call postgresql.installed or postgresql.version
> facter doesn't show any result.
>
> This was a bug in facter that was recently fixed. The bug was that facts
> from ruby (i.e. custom facts) were not able to be traversed by facter's
> command line query.  I'm on a mobile device at the moment, so I'll
> follow-up with a link to a ticket when I can.
>

FYI, this was FACT-1254: https://tickets.puppetlabs.com/browse/FACT-1254

It was fixed in Facter 3.1.2.


> >
> > [root@centos7 ~]# facter -p postgresql.installed
> >
> > [root@centos7 ~]# facter -p postgresql.version
> >
> > What could possibly cause this?
> >
> > --
> > 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 [email protected].
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/be550b4e-e7b7-4e36-89d4-2e37445b910f%40googlegroups.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CACZQQfOfS4Pc4FN7vDQ8bwidBqFZCucUBkFPpqK%2BnT41NAWrSg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to