On 4/28/14, 5:06 PM, mike wrote:
> 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.

Hi,

Check that /etc/puppet/hiera.yaml and /etc/hiera.yaml are both symlinks
to /var/lib/hiera/hiera.yaml.

Best regards,
-g


-- 
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658

-- 
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/535EC4FB.6070408%40garretthoneycutt.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to