Ask Your Question
2

Cannot get hiera_config to work

asked 2013-06-04 07:21:18 -0500

systemgeek gravatar image

updated 2013-06-04 19:12:39 -0500

[root@tds-test01 ~]# cat /etc/puppet/puppet.conf
[main]
    evaltrace = true
    railslog = debug
    logdir = /var/log/puppet
    rundir = /var/run/puppet
    ssldir = $vardir/ssl
    manifestdir = /opt/tds/puppet/manifests/som
    manifest = $manifestdir/site.pp
    factpath = /opt/tds/puppet/modules/facts/lib/facter
    yamldir = /var/lib/puppet/yaml/ { owner = root, group = root, mode = 0777 }
    modulepath = /opt/tds/puppet/modules:/opt/tds/puppet/roles:/opt/tds/puppet/third-   party/modules
[agent]
    classfile = $vardir/classes.txt
    server = <a href="http://tds-test01.som.kayak.com">tds-test01.som.kayak.com</a>
    listen = true
    report = true    
    localconfig = $vardir/localconfig
[master]
    autosign = $confdir/autosign.conf
    ssl_client_header = SSL_CLIENT_S_DN
    ssl_client_verify_header ...
(more)
edit retag flag offensive close merge delete

Comments

Have you restarted the master since making these changes?

llowder gravatar imagellowder ( 2013-06-04 07:38:05 -0500 )edit

Yes. I found that comment a while back and since then almost any changes I make I do a httpd restart

systemgeek gravatar imagesystemgeek ( 2013-06-04 08:23:04 -0500 )edit
1

It's just a guess but have you tried to use " instead of ' in the hiera.yaml if you use variables?

MookiE gravatar imageMookiE ( 2013-06-05 05:28:05 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-07-24 08:11:59 -0500

llowder gravatar image

For variable interpolation to work in the hiera.yaml you need to use double quotes around the strings, rather than leaving them unquoted or using single quotes (which disables interpolation).

Using your example:

---
:backends:
   - yaml

:hierarchy:
   - "%{module_name}/%{environment}"
   - "%{module_name}/%{hostname}"
   - "%{module_name}/%{operatingsystem}"
   - "%{module_name}/defaults"
   - common

:yaml:
  :datadir: "/opt/tds/hiera/data/%{module_name}"

puppet:
  :datasource: 'data'
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

Stats

Asked: 2013-06-04 07:21:18 -0500

Seen: 796 times

Last updated: Jul 24 '13