-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Also, did you stub out your template and run it manually with erb?

<%
 # This stuff is stubs for variables that would normally be passed in
 # by a define.

 var1 = 'foo'
 var2 = 'bar'
- -%>

<%
 # Begin normal template

 if var1.eql?('foo') then
- -%>
<%= var2 %>
<% end -%>

Then run that file with 'erb -T- <filename>' and see what happens.

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)

iQEcBAEBAgAGBQJNFAKiAAoJECNCGV1OLcypzesH/jMUcHl+Y6KoNY1327WjSPfz
Oa7zGdBlvirwAXsYXXbm3240J5XRVgaG5nMvKjIuism+3Ve4OV2x2zlajV+sSuOw
yQeYEo3APkO1I7TrjHuVW+ZSaU2GdO0KBLCc061SxlUKrcaOwJwk0e9a/6MTqlsr
BTWBnDE+zmbB0lmJ/nubXkwBdY6VMSd/4U9QwjrKuGudEb053ny614unZJgQRYzi
ABKBSPrbGQSPfzxtN34aKI9qV0HkjN1zb3vdOHby8LQ+JMTbJ6uvpToX/rQCC6pf
VOGf1bfytCGLCwJ3Eh4K/fhMqveVRAaGT0xCm9JL07sby1riCsXzro0VJQNAz0Y=
=13jC
-----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>>

Reply via email to