Re: [Puppet Users] compare two variables via regex

2014-12-13 Thread Henrik Lindberg
On 2014-05-12 16:43, Ramin K wrote: On 12/5/14 3:16 PM, Lori Cho wrote: I have two variables and I want to compare them to each other. However, the regex doesn't return true, because it seems to treat the variable in the // as a literal. Something like this: $variable1 = 'foo' $variable2 = 'f

Re: [Puppet Users] compare two variables via regex

2014-12-10 Thread Felix Frank
On 12/06/2014 01:43 AM, Ramin K wrote: > On 12/5/14 3:16 PM, Lori Cho wrote: >> I have two variables and I want to compare them to each other. However, >> the regex doesn't return true, because it seems to treat the variable in >> the // as a literal. >> >> Something like this: >> >> $variable1 =

Re: [Puppet Users] compare two variables via regex

2014-12-05 Thread Ramin K
On 12/5/14 3:16 PM, Lori Cho wrote: I have two variables and I want to compare them to each other. However, the regex doesn't return true, because it seems to treat the variable in the // as a literal. Something like this: $variable1 = 'foo' $variable2 = 'foobar' if($variable2 =~ /$variable1/

[Puppet Users] compare two variables via regex

2014-12-05 Thread Lori Cho
I have two variables and I want to compare them to each other. However, the regex doesn't return true, because it seems to treat the variable in the // as a literal. Something like this: $variable1 = 'foo' $variable2 = 'foobar' if($variable2 =~ /$variable1/) { notify {"it works":} }