I'm having some issues trying to track down a problem I'm having parsing a
simple template, using create_resources and Hiera. Here's my setup
(abridged):
../hieradata/settings.yaml:
*global:*
* variables:*
* env: foo*
*
*
*appSpecific:*
* serverName: someServer*
../modules/test/manifests/init.pp:
*class test {*
* create_resources(test::variables, hiera('global'))*
* $appcfg = hiera('appSpecific')*
*
*
* define variables($env) {*
* file { "app_cfg":*
* path => "/etc/app/app.cfg",*
* owner => root,*
* group => root,*
* mode => 644,*
* notify => Service["app"],*
* content => template("test/$env.cfg.erb"),*
* }*
* }*
*
*
*
*
*.....*
*}*
*
*
../templates/foo.cfg.erg:
* ServerName <%= appcfg['serverName'] %>*
*
*
And this is the error I get:
*err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Failed to parse template test/foo.cfg.erb:*
* Filepath: /etc/puppet/modules/test/templates/foo.cfg.erb*
* Line: 1*
* Detail: wrong number of arguments*
* at /etc/puppet/modules/test/manifests/init.pp:12 on node appnode*
If I commend out the "create_resources" and the "define" blocks, the
template works just fine. I'm guessing maybe there is a scope issue here
or something, but I haven't been able to track it down. I've tried this:
*ServerName <%= scope.lookupvar(test::appcfg['serverName']) %>*
*
*
but still no workie.
Any pointers or advice would be appreciated.
*
*
--
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.