Hi Guto,
On Nov 17, 2015 6:19 PM, "Guto Carvalho" <gutoca...@gmail.com> 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.
>
> [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 puppet-users...@googlegroups.com.
> 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.
Hi Guto,
On Nov 17, 2015 6:19 PM, "Guto Carvalho" <gutoca...@gmail.com> 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.