On Friday, March 8, 2013 10:16:37 AM UTC, vioilly wrote: > > Is there a way to use send multiple parameter values using puppet > dashboard ENC? > > For example, > > nameserver = 10.0.0.1, 10.0.0.2 > > or perhaps > > nameserver = ['10.0.0.1','10.0.0.2'} > > then the template erb file can loop through each of the nameserver values > to set up mulitple nameservers in resolve.conf? > > Don't use the dashboard as an ENC (use extlookup/hiera) but the ERB looks something like this. With a split on whitespace:-
# # The below is generated by Puppet template from <%= @module_name %> module: domain <%= scope.lookupvar('resolver::params::domainname') %> search <%= scope.lookupvar('resolver::params::searchpath') %> <% scope.lookupvar('resolver::params::resolvers').split(/\s+/).each do | ns | -%> nameserver <%= ns %> <% end -%> So however you get your key/value pairs should be fine. -- 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+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.