Hi Dennis, i have found a better solution via create_resources (look at my reply to Gery)
thanks anyway. rgds Florian Am Donnerstag, 15. März 2012 21:56:34 UTC+1 schrieb Dennis Hoppe: > > Hello Florian, > > Am 15.03.2012 20:47, schrieb Florian Koch: > > i have some trouble with hiera and %{calling_module}. > > i have had a similiar problem. You need to submit the values to the define. > > > i have: > > > > class tomcat::instance{ > > $instances = hiera('tomcat_instances') > > tomcat::installer{$instances:} > > } > > > > define tomcat::installer { > > require 'tomcat' > > > > $instance_opts = hiera($name) > > $tomcat_user = $instance_opts[user] > > $tomcat_group = $instance_opts[group] > > $basedir = $instance_opts[basedir] > > $logdir = $instance_opts[logdir] > > $tomcat_name = $instance_opts[name] > > > > $tomcat_version='6' > > ... > > } > > You should try something like this: > > class tomcat::instance { > $instances = hiera('tomcat_instances') > > tomcat::installer { $instances[name]: > basedir => $instances[basedir], > logdir => $instances[logdir], > user => $instances[user], > group => $instances[group], > } > } > > define tomcat::installer ($basedir, $logdir, $user, $group) { > ... > } > > I am using this method for my Icinga module > (http://github.com/dhoppe/puppet-icinga). You should take a look at the > following files: > > - examples/icinga.yaml > - manifests/contact.pp > - manifests/contact/contacts.pp > > Regards, Dennis > > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/pZQzqjg2Dj4J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.