Re: [Puppet Users] Re: manipulating facter variable

2010-10-14 Thread Justin Brehm
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:

Re: [Puppet Users] Re: manipulating facter variable

2010-10-14 Thread Rob Terhaar
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('

[Puppet Users] Re: manipulating facter variable

2010-10-14 Thread Dennis vdM
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