Ask Your Question

Puppet not finding facts in manifests but 'facter <fact>' from the command line works just fine.

asked 2018-06-04 19:32:39 -0600

bschonecker gravatar image

I've got multiple [sudden] problems with my Puppet server (open source). I have a very easy manifest:

notify { 'FqdnTest':
    withpath => true,
    name     => "my fqdn is ${::fqdn}",

When I run this manifest, I get:

[root@rbpups01 bschonecker]# puppet apply -t fqdn.pp
Warning: Unknown variable: '::fqdn'. (file: /home/bschonecker/fqdn.pp, line: 3, column: 31)
Notice: Compiled catalog for rbpups01.example.local in environment production in 0.16 seconds
Info: Caching catalog for rbpups01.example.local
Info: 'replace_catalog' command for rbpups01.example.local submitted to PuppetDB with UUID 25d52610-31c5-4872-b30f-1580c02ae1b2
Info: Applying configuration version 'rbpups01-production-11fc68b283d'
Notice: /Stage[main]/Main/Notify[FqdnTest]/message: my fqdn is 
Notice: /Stage[main]/Main/Notify[FqdnTest]/message: defined 'message' as 'my fqdn is '
Notice: Applied catalog in 0.12 seconds

But when I do a simple 'facter fqdn' I get what I expect:

facter fqdn

No other server is experiencing this problem.

 rpm -qa | grep puppet | sort
edit retag flag offensive close merge delete


did you try `puppet lookup fqdn` ? If that works, it may be that you need to reference the fact in your puppet code using the facts hash, so do `$facts['fqdn']` and see if that works.

DarylW gravatar imageDarylW ( 2018-06-05 07:54:02 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-07-02 18:24:06 -0600

l0k169 gravatar image

sorry but works form me notify { 'facter fqdn': message => "${::fqdn}" } But i use the command 'puppet agent

edit flag offensive delete link more


Hmmm, path/permission related?

DarylW gravatar imageDarylW ( 2018-07-03 07:32:45 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-06-04 19:32:39 -0600

Seen: 113 times

Last updated: Jul 02