---
:backends:
- yaml
- json
:yaml:
:datadir: /etc/puppet/hieradata
:json:
:datadir: /etc/puppet/hieradata
:hierarchy:
- common
- "node/%{::fqdn}"
:merge_behavior: deeper
When I issue hiera smtpserver, I have this output :smtpserver: "mail.%{::domain}"mail.
Even the lookup type (deeper here in my config) doesn t provide the same output as the example ...
Any idea ? version issue ?
Thx a lot for your advice / answer.
On 08.01.2015, at 09:52, Raphael <raphae...@gmail.com> 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) :When I issue hiera smtpserver, I have this output :smtpserver: "mail.%{::domain}"mail.
hiera smtpserver domain=example.com That should work. If using hiera from CLI, you need to provide the facts etc also. See the docs : https://docs.puppetlabs.com/hiera/1/command_line.html
--
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 puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/3590c684-299f-4775-a12a-f241ab06f75d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
-- Johan De Wit Open Source Consultant Red Hat Certified Engineer (805008667232363) Puppet Certified Professional 2013/2014 (PCP0000006) blog : http://johan.koewacht.net/ _________________________________________________________ Open-Future Phone +32 (0)2/255 70 70 Zavelstraat 72 Fax +32 (0)2/255 70 71 3071 KORTENBERG Mobile +32 (0)474/42 40 73 BELGIUM http://www.open-future.be _________________________________________________________
Upcoming Events:
Zabbix Certified Specialist | http://www.open-future.be/zabbix-certified-professional-training-8th-till-9th-janaury
Zabbix Certified Professional | http://www.open-future.be/zabbix-certified-professional-training-8th-till-9th-janaury
Bacula Administrator 1 | http://www.open-future.be/bacula-administrator-i-training-13th-till-15th-january
Puppet Fundamentals | http://www.open-future.be/puppet-fundamentals-training-26th-till-28th-january
Puppet Architect | http://www.open-future.be/puppet-architect-training-29th-till-30th-january
Subscribe to our newsletter: http://eepurl.com/BUG8H
hiera site_users
{"bob"=>{"uid"=>501, "shell"=>"/bin/bash"},
"ash"=>{"uid"=>502, "shell"=>"/bin/zsh", "group"=>"common"}}
hiera site_users ::fqdn=myhost
{"jen"=>{"uid"=>503, "shell"=>"/bin/zsh", "group"=>"deglitch"},
"bob"=>{"uid"=>1000, "group"=>"deglitch"}}
:hierarchy:
- "node/%{::fqdn}"
- common
:merge_behavior: deeper