On Tue, May 24, 2011 at 9:06 AM, Aaron Grewell wrote:
> Argh, I'll have to take that back. The docs are right, the quotes are in
> fact necessary. Without them has_variable will always return false.
My bad, responded in haste. Unquoted in ruby is actually a variable,
so no that wouldn't work co
Argh, I'll have to take that back. The docs are right, the quotes are in
fact necessary. Without them has_variable will always return false.
Here's the rub: If a variable is never declared then has_variable returns
false. If it's set to 'undef' then it returns true. That wouldn't be so bad
if y
Yup, that works. FYI there's a bug in the docs. The example shown here:
http://docs.puppetlabs.com/guides/templating.html#undefined-variables
Looks like so:
<% if has_variable?("myvar") then %>
myvar has <%= myvar %> value
<% end %>
On Mon, May 23, 2011 at 4:59 PM, Nan Liu wrote:
> On Mon, Ma
On Mon, May 23, 2011 at 4:09 PM, Aaron Grewell wrote:
> I've got a conditional statement that isn't working the way I expect. I've
> created a define() for building network interfaces, but two of the entries
> (master & slave) are only appropriate for bonded interfaces. I would like
> them to be
I've got a conditional statement that isn't working the way I expect. I've
created a define() for building network interfaces, but two of the entries
(master & slave) are only appropriate for bonded interfaces. I would like
them to be completely excluded from regular interfaces. This seems easy