Ask Your Question

Using external facts in hiera.yaml

asked 2013-05-10 05:50:43 -0600

dawud gravatar image

updated 2013-05-13 04:09:47 -0600

I am using facter version 1.7.0, which provides external facts capabilities.

Is it possible to use external facts in my puppetmaster's hiera.yaml? Given the following yaml file in /etc/facter/facts.d:

location: madrid

I would like to have the following in hiera.yaml:

  - yaml
  - "%{::hostname}"
  - common
  :datadir: "/etc/puppet/hieradata/%{::domain}/%{::location}"

This is my routes.yaml, as I am using puppetdb as well:

    terminus: puppetdb
    cache: yaml

Could this be related to this question?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-05-10 10:40:59 -0600

jonn gravatar image

You should be able to - I use facts in my datadir, and external facts shouldn't be treated any differently, as far as I know. Are you having problems with it?

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


Asked: 2013-05-10 05:50:43 -0600

Seen: 2,996 times

Last updated: May 13 '13