diff options
Diffstat (limited to 'lib/puppet/parser/functions/has_interface_with.rb')
-rw-r--r-- | lib/puppet/parser/functions/has_interface_with.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/puppet/parser/functions/has_interface_with.rb b/lib/puppet/parser/functions/has_interface_with.rb index d5dbe47..00e405d 100644 --- a/lib/puppet/parser/functions/has_interface_with.rb +++ b/lib/puppet/parser/functions/has_interface_with.rb @@ -34,8 +34,7 @@ has_interface_with("lo") => true end kind, value = args - kind.downcase! - + if lookupvar(kind) == value return true end @@ -43,7 +42,12 @@ has_interface_with("lo") => true result = false interfaces.each do |iface| iface.downcase! - if value == lookupvar("#{kind}_#{iface}") + factval = nil + begin + factval = lookupvar("#{kind}_#{iface}") + rescue Puppet::ParseError # Eat the exception if strict_variables = true is set + end + if value == factval result = true break end |