There's a split function in Puppet's DSL as well. If you don't want
to do the inline_template() route.
http://docs.puppetlabs.com/references/stable/function.html#split
On Thu, Oct 14, 2010 at 10:26 AM, Dennis vdM wrote:
> THNX! Just what I needed ;-)
>
> On 14 okt, 16:18, Mohit Chawla wrote:
I think the bigger question is, what problem are you trying solve with this?
On Oct 14, 2010 10:26 AM, "Dennis vdM" wrote:
> THNX! Just what I needed ;-)
>
> On 14 okt, 16:18, Mohit Chawla wrote:
>> Split & Join inside an inline template should work well.
>>
>> For eg.,
>> $nsip=inline_template('
THNX! Just what I needed ;-)
On 14 okt, 16:18, Mohit Chawla wrote:
> Split & Join inside an inline template should work well.
>
> For eg.,
> $nsip=inline_template('<%= ipaddress.split(".")[0..1].collect{|x|
> x}.join(".") %>')
>
> This will split an ip address, say 192.168.1.3, split it at each o