Christian Charpentier
2014-Jun-06 16:10 UTC
[Puppet Users] Puppet + hiera file backend problem
Hi, I'm using hiera with puppet and i want to store my resources out from the modules, in hieradata directory. Here is my hiera.yaml file: --- :hierarchy: - common # - %{operatingsystem} - %{::hostname} :backends: - yaml - file :yaml: :datadir: '/etc/puppet/hieradata' :file: :datadir: '/etc/puppet/hieradata' :logger: console The common.yaml file: --- apache_packages_list: - apr-1.4.8 - apr-devel-1.4.8 - apr-util-1.5.2 - apr-util-devel-1.5.2 - distcache-1.4.5 - distcache-devel-1.4.5 - httpd-2.4.6 - httpd-tools-2.4.6 - mod_ssl-2.4.6 accounts_conf_filename: accounts.victorbuckservices.com.conf accounts_conf_balancer_filename: accounts.victorbuckservices.com.balancer.conf certificate_filename: all.dev.victorbuckservices.com.crt key_filename: all.dev.victorbuckservices.com.key My site.pp call a role which call itself a profile which uses a module to install apache. Here is the config..p of apache module: class apache::config { $accounts_conf_filename = hiera('accounts_conf_filename') $accounts_conf_balancer_filename = hiera('accounts_conf_balancer_filename') $crt_filename = hiera('certificate_filename') $key_filename = hiera('key_filename') file {'/etc/httpd/conf.d/accounts.victorbuckservices.com.conf': ensure => file, content => template($accounts_conf_filename), } file {'/etc/httpd/conf.d/$accounts_conf_balancer_filename': ensure => file, content => template($accounts_conf_balancer_filename), } file {'/etc/pki/tls/certs/$crt_filename': ensure => file, content => template($crt_filename), } file {'/etc/pki/tls/private/$key_filename': ensure => file, content => template($key_filename), } } I put data and resource files in /etc/puppet/hieradata/ and when i use the command line on the client: puppet agent --server=d0puppet.victor-buck.com --debug --verbose --noop --test I got the following error : Error 400 on Server: could not find template 'accounts.victorbuckservices.com.conf' at /etc/puppet/modules/apache/manifests/config.pp:9 on node puppetclient Someone to help to figure out what happen? If there are some information missing to make easier to understand what's going on feel free to ask me. Thanks. Christian -- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/00bf537c-6ac1-4351-b4c3-e4f99bdda189%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.