Okay, here comes the follow-up question.
I've changed the zpack_installer, which doesn't do any inline_template() 
things any more,  instead it looks something like this now:

define installer::zpack_installer($sure='present',
>                                   $inst='false',
>                                   $zp_ver, $zp_rep) {
>     ....
>     ....
> }
>

and then:

class packages::zenpacks::core {

    $zpack_list = keys($hr_zpack_core)
    ## $hr_zpack_core is the hash, comes from nodes.pp 

    installer::zpack_installer { $zpack_list:
        zp_ver   => inline_template("<%= 
@hr_zpack_core[@name]['ver'].to_s.chomp %>"),
        zp_rep   => inline_template("<%= 
@hr_zpack_core[@name]['rep'].to_s.chomp %>"),
        require  => Installer::Zpack_installer[ inline_template("<%= 
@hr_zpack_core[@name]['req'].to_s.chomp %>") ],
    }
}

But it's failing with: err: Failed to parse inline template: undefined 
method `[]' for nil:NilClass
 
I think, the problem is coming from the @name bit. Is it right way of doing 
it? 
if I do the same thing in a ruby console, replacing @name with a 'key', I 
get exactly what I expect. Any pointer??

-San

-- 
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/6bd06ca0-e28a-48ad-9469-cbda98f722a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to