Using external facts in puppet manifests

284 views
Skip to first unread message

Deep

unread,
Feb 14, 2014, 11:42:30 AM2/14/14
to puppet...@googlegroups.com
Hi,

I have created few external facts by putting an yaml file in /etc/puppetlabs/facter/facts.d folder on agent and they are available in puppetdb and in my erb templates.

But I am not able to use them in puppet manifests.I am getting undef value.

Is there anyway to use them?

Deep

jcbollinger

unread,
Feb 17, 2014, 9:33:40 AM2/17/14
to puppet...@googlegroups.com


If the facts are being interpolated into your templates then they are also available in your manifests.  If you present an example manifest wherein the fact value does not seem to be read correctly, then we may be able to help.  At a first guess, though, I'd rate the chances near unity that either the manifest is reading the fact value correctly, or that its name is misspelled.


John

Deep

unread,
Feb 17, 2014, 12:15:42 PM2/17/14
to puppet...@googlegroups.com
Hi John,

thanks a lot for your response. I am able to see the external fact value now. 

Malintha Adikari

unread,
Jun 20, 2014, 2:00:27 AM6/20/14
to puppet...@googlegroups.com
I am facing the same issue. I have set

key1=value1

inside my puppet agent facts.d/file.txt.

How this value can be taken into manifest in my puppet agent. I have tried $key1 and ${::key1} but not worked. What is the correct way of taking it ?

Regards,
Malintha

Malintha Adikari

unread,
Jun 20, 2014, 2:08:23 AM6/20/14
to puppet...@googlegroups.com
Hi all


I could solve it using $::items in my manifest.
Reply all
Reply to author
Forward
0 new messages