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

Just a note...

defined?(foo) doesn't work.

You have to use:

has_variable?("foo")

Found that out the hard way :-/.

Trevor

On 07/25/2009 01:21 PM, Udo Waechter wrote:
> Hi,
> 
> On 24.07.2009, at 22:17, lance dillon wrote:
>>
>> I only want the line to be included if $role exists and is equal to
>> fast.  If $role doesn't exist, or doesn't equal "fast", it shouldn't
>> include the line:
>>
>> Jul 24 19:59:40 lonengbld01 puppetmasterd[3095]: Failed to parse
>> template repo/R
>> edHat-4/extras.repo: Could not find value for 'role' at
>> /etc/puppet/modules/repo
>> /manifests/init.pp:121 on node blah
> 
> 
> 
> We use:
> 
> <% if defined?(role) and role == "fast" -%>
> this line is here now
> <% end -%>
> 
> Bye.
> udo.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkprp0MACgkQyjMdFR1108CEZACglGer6GJxiCp0DVn+kDLze8Ys
eK8An0kWfS0MxfJvbEL87Xwpx22WzFTQ
=FqCu
-----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-users@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to