Hi everyone,
I learning Hiera for my Puppet configuration but I've the error when i
execute the node connection.
[....................]
Error: Could not retrieve catalog from remote server: Error 400 on SERVER:
Could not find data item apache_package in any Hiera data file and no
default supplied at /etc/puppet/modules/apache/manifests/init.pp:2 on node
node2.example.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
[....................]
But when i check data depending returns nil
[....................]
[root@master puppet]# hiera -c hiera.yaml apache_package osfamily=Debian
nil
[root@master puppet]# hiera -c hiera.yaml apache_package osfamily=RedHat
nil
[....................]
Hiera yaml file
[....................]
[root@master puppet]# cat hieradata/RedHat.yaml
apache_package: 'httpd'
apache_service: 'httpd'
[root@master puppet]# cat hieradata/Debian.yaml
apache_package: 'apache2'
apache_service: 'apache'
[....................]
[....................]
[root@master puppet]# cat hiera.yaml
---
:backends: - yaml
:hierarchy:
- %{osfamily}
- common
:yaml:
:datadir: /etc/puppet/hieradata/
[....................]
Thanks.
--
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/6bc700db-4df0-4e21-b4ad-96ecbd5a5210%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.