Hi,

That looks a weird way of using facts. In my opinion that kind of detail should 
be in your puppet code, not your fact code.

What I would push out as facts are things like:

> v_ntp__ntp_conf=default

And then use puppet code to manage the 'if $::v_ntp...' (Notice top scope there 
for the fact variable). An alternative much better than this is to use Hiera.

Now, why is puppet not seeing that fact, I honestly don't know. Try different 
things like removing the puppet:/// schema and see if it works. Does a single 
word work without and forward slashes?

But really, I don't like the way your code is headed :)

HTH
Den

On 11/09/2013, at 1:38, David Thompson <dthomp...@waisman.wisc.edu> wrote:

> I'm working with custom facts with facter 1.7.2.  I've created a fact file 
> with an ntp configuration fact in it:
> 
> # grep ntp_conf /etc/facter/facts.d/myfacts.txt 
> puppet:///modules/ntp/DEFAULT/ntp_conf
> 
> facter knows the fact is there:
> 
> # facter -p v_ntp__ntp_conf
> puppet:///modules/ntp/DEFAULT/ntp_conf
> 
> ...but puppet thinks the variable is undefined:
> 
> # cat /tmp/notify.pp 
> notify{$hardwaremodel:}
> notify{$v_ntp__ntp_conf:}
> [root@sazabi facts.d]# puppet apply /tmp/notify.pp 
> Notice: x86_64
> Notice: /Stage[main]//Notify[x86_64]/message: defined 'message' as 'x86_64'
> Notice: undef
> Notice: /Stage[main]//Notify[undef]/message: defined 'message' as 'undef'
> Notice: Finished catalog run in 0.28 seconds
> 
> What am I missing here?  Thanks!
> -- 
> 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 post to this group, send email to puppet-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to