Hi, > On 08.01.2015, at 09:52, Raphael <[email protected]> wrote: > > Hi, > I have a working puppetmaster installed from package on an ubuntu server > 14.04 64bits. > I've been struggeling for a while now with hiera to achieve what it is > written in the doc ; > > My hiera version is 1.3.0 > Puppetmaster version 3.4.3 > > My hierachy settings is quite simple, with a common file and a specific file > for host : > > --- > :backends: > - yaml > - json > :yaml: > :datadir: /etc/puppet/hieradata > :json: > :datadir: /etc/puppet/hieradata > :hierarchy: > > - common > - "node/%{::fqdn}" > > :merge_behavior: deeper > > This file is in /etc/puppet/ and linked to /etc/hiera.yaml > > In the common.yaml, I'm trying to use a variable based on facts (like in the > example on the official documentation) : > > > smtpserver: "mail.%{::domain}" > > When I issue hiera smtpserver, I have this output : > > mail.
You are running the hiera command on cli? In this case you do not have facts available. But: you can provide facts on cli: hiera -c /etc/hiera.yaml smtpserver domain=foobar.com <http://foobar.com/> hth, Martin -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/B29F42AF-F35C-4609-B8DE-58A91D296CAB%40gmail.com. For more options, visit https://groups.google.com/d/optout.
