Ask Your Question

Ruby Facts vs Facter 1.7

asked 2013-09-10 01:00:53 -0600

dinesh_kumar_logaraj gravatar image

Am not sure that I am asking the right question.. Is there any separate concept of Ruby Facts and Facter 1.7.. Right from my day one learning of puppet, I have been thinking that Facts are like environment variables concept and we can create custom facts using Ruby.. Please help me on this. Thank you..

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-09-10 01:58:42 -0600

Ancillas gravatar image

Facter uses various sources to generate facts about a server. Ruby facts are one type of fact. These facts are generated from snippets of Ruby code that run against a node. When you run facter on the command line, most of the facts you see were generated by Ruby code.

Here's a list of facts that are available in Hiera 1.6.

And here's an example of the Ruby code that generates that fact.

# Fact: fqdn
# Purpose: Returns the fully qualified domain name of the host.
# Resolution: Simply joins the hostname fact with the domain name fact.
# Caveats ...
edit flag offensive delete link more

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: 2013-09-10 01:00:53 -0600

Seen: 143 times

Last updated: Sep 10 '13