Hello, I do this with hiera, like explained here :
http://serverfault.com/questions/512203/how-do-i-configure-parameterized-classes-with-arrays-in-puppet Put your array in a example.com.yaml file. 2014-02-11 10:51 GMT+01:00 Luis León <[email protected]>: > I have on my node definition the following code: > > *node 'example.com <http://example.com>'* { > > class {'push': > $roles => { rol_as => "false", > rol_ws => "true", > ... }, > } > > And I need to pass these variables to a class through: > > *class push ($roles)* { > ... > if $roles[rol_ws]=='true' { > ... > } > > } > > It works defining the hash inside the class but on the node definition > don't work, any suggestion? > > Thanks!! > > > > > > > -- > 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/11e8399f-0891-45fa-9a1e-3f079f73185b%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. > -- 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/CAE9jN31ONiG2BY5qP7DFmiBW8rR-yFLtFSSAWkj3QM%3D8BGH8aw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
