Hi everyone,
I am trying to simulate the 'grep -v' behavior in an array:
Ex:
vgrep(['aaa','bbb','ccc','aaaddd'], 'aaa')
Would return:
['bbb', 'ccc']
So I tried to use ruby to do it: normally the '-' operation should be
enough (http://www.ruby-doc.org/core-1.9.3/Array.html#method-i-2D)
Here is the code:
puppet apply -e '
$my_array=[ "test", "tt" ]
$sub_test = [ "tt" ]
$result= inline_template("<% my_array-sub_test %>")
notice("$my_array")
notice("$my_array - $sub_test")
notice("$result")
'
notice: Scope(Class[main]): testtt
notice: Scope(Class[main]): testtt - tt
notice: Scope(Class[main]):
notice: Finished catalog run in 0.11 seconds
So it doesn't work this way any thoughts?
Regards,
JM
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.