Hi,
Could it be something stupid like
---
fqdn: puppet.koewacht.net
in your facts.yaml ?
I generated my facts.yaml from facter -y
Grts
Jo
On 01/09/2014 12:29 PM, Peter wrote:
Hi List,
I am experimenting with different hiera hierarchy's through the hiera
command line. I am passing in different facts to simulate different
nodes. In the beginning I would manually pass them in as parameters
on the command line after a while when I wanted to pass in more and
more facts I decided to use the YAML scope file option.
This does not seem to work when I use the :: notation in the
hieral.yaml under the hierarchy. I have simplified my hierarchy to
demonstrate the issue. The relevant files look like:
**********************************************
$ ls -R
.:
facts.yaml hiera.yaml hieradata
./hieradata:
common.yaml node
./hieradata/node:
creator.mgnt.local.yaml
**********************************************
$ cat hiera.yaml
---
:backends:
- yaml
:yaml:
:datadir: ./hieradata
:hierarchy:
- "node/%{::fqdn}"
- common
**********************************************
$ cat hieradata/common.yaml
---
ip: '192.168.0.1'
**********************************************
$ cat hieradata/node/creator.mgnt.local.yaml
---
ip: '10.0.0.1'
**********************************************
$ cat facts.yaml
---
fqdn: "creator.mgnt.local"
If I manually pass the facts on the command line it works
$ hiera -c hiera.yaml ip ::fqdn=creator.mgnt.local -d
DEBUG: 2014-01-09 22:19:48 +1100: Hiera YAML backend starting
DEBUG: 2014-01-09 22:19:48 +1100: Looking up ip in YAML backend
DEBUG: 2014-01-09 22:19:48 +1100: Looking for data source
node/creator.mgnt.local
DEBUG: 2014-01-09 22:19:48 +1100: Found ip in node/creator.mgnt.local
10.0.0.1
However if I use a file which contains the facts it doesn't work
$ hiera -c hiera.yaml ip -y facts.yaml -d
DEBUG: 2014-01-09 22:26:31 +1100: Hiera YAML backend starting
DEBUG: 2014-01-09 22:26:31 +1100: Looking up ip in YAML backend
DEBUG: 2014-01-09 22:26:31 +1100: Looking for data source common
DEBUG: 2014-01-09 22:26:31 +1100: Found ip in common
192.168.0.1
In the facts file I have have tried it also declaring it like "::fqdn"
but that also does not work. Is there an option to bring the factor
variables into the global scope?
Thanks,
Peter
--
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/420abd32-c607-4374-ad34-64c999487ed7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
Johan De Wit
Open Source Consultant
Red Hat Certified Engineer (805008667232363)
Puppet Certified Professional 2013 (PCP0000006)
_________________________________________________________
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
_________________________________________________________
Next Events:
Puppet Fundamentals Training |
http://www.open-future.be/puppet-fundamentals-training-4-till-6th-february
Puppet Intruction Course |
http://www.open-future.be/puppet-introduction-course-7th-february
Zabbix Certified Training |
http://www.open-future.be/zabbix-certified-training-10-till-12th-february
Zabbix for Large Environments Training |
http://www.open-future.be/zabbix-large-environments-training-13-till-14th-february
Subscribe to our newsletter | http://eepurl.com/BUG8H
--
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/52CECC0B.20902%40open-future.be.
For more options, visit https://groups.google.com/groups/opt_out.