Silviu Paragina wrote: > Are there any such things? For example > $ip_list_arr=split(ip_list,",") > $ip_external=*$ip_list_arr[0]* > > Or the only way to do it, is via custom functions? > I think I read something like this before, but can't remember where or > if it was with a custom function or not.
Not at the moment. There is some work being done to add hashes to the Puppet language, and then I think we will get array indexing at the same time. If you only need it once, you can abuse inline_template() to do it: $ip_list_arr = split($ip_list, ",") $ip_external = inline_template("<%= ip_list_arr[0] %>") Or, for this specific case, where you start by splitting a string, you can use regsubst(): $ip_external = regsubst($ip_list, "^([^,]*).*", "\\1") /Bellman -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.