-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Meh, ignore this post, I had my statement backward.
== should work where .eql doesn't. Trevor On 12/23/2010 09:15 PM, Trevor Vaughan wrote: > My guess is that '==' is actually comparing objects in Ruby. > > Try dns_role.eql?("stuff") and see if you get a better result. > > Trevor > > On 12/23/2010 09:10 PM, Me wrote: >> On Thu, Dec 23, 2010 at 4:19 PM, Stefan Schulte >> <stefan.schu...@taunusstein.net> wrote: >>> I don't really get it. You're testing dns_role agains "master". And you >>> can see that dns_role is indeed "master" when you just use some simple >>> <%= dns_role %>. And the code inside your if statement is evaluated. So >>> what exactly is the problem? Or is your problem that even nodes that >>> dont have dns_role set are including this cp command? And dns_role is >>> still "master" when you never set it to "master"? >>> >>> Or do you see the comments but no cp command? I just put your snippet in >>> a template and it works as expected. >>> > >> The cp command is never included in the templatized shell script, no >> comments either, whether "dns_role" is set to "master" or "slave". > >> That's why I called it a bug, since it makes no sense. I even have >> super experienced programmers that do Puppet day in and out at work, >> and they just scratched their heads. > - -- Trevor Vaughan Vice President, Onyx Point, Inc. email: tvaug...@onyxpoint.com phone: 410-541-ONYX (6699) pgp: 0x6C701E94 - -- This account not approved for unencrypted sensitive information -- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJNFAL7AAoJECNCGV1OLcypBccIAIetMWvFefq6XVVt6sZO0wEA e2KjuDGw34ivOJySOzu57KRx+UGKD9PXtA+jkUthFeJzyFe4nAogpZF2G1RoAgEK 6Tf4pi/QjbJrbeoBUBKs8+CbGVmTZQJNEs+rEG0wk2Vm/QqlMGRpXIt1IYxd7UK2 9+rB3RZrh84VVHXo1pIAF73ZXBrXssifBjEW4YkGRb2NWF5CeFEtxpxwwyJ02W1q VNYjNoCnWpI1+VMd6EX6mEFemhT2cQ58cHCmqppq/KJR3xDEpc96iduAKxhBKCxw Tgf1zTCLRhzllFMk2ZPPq+FW58yfYY32GXh5bF9LU5Y/2IhDJDCl4WD2LunkzYg= =jW0o -----END PGP SIGNATURE----- -- 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.
<<attachment: tvaughan.vcf>>