Ask Your Question
1

Using external facts in hiera.yaml

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

dawud gravatar image

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

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:

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

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

---
master:
  facts:
    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
1

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

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

Stats

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

Seen: 2,468 times

Last updated: May 13 '13