Calls to scope.lookupvar replaced with has_variable?

The previous calls to sope.lookupvar were very
dependeny on the version of puppet used.

These calls have been replaced with the more
reliable and concise has_variable? method.
This commit is contained in:
Dan Bode 2012-01-23 10:50:45 -08:00
parent 917426380e
commit d74a7cebaa
3 changed files with 6 additions and 6 deletions

View File

@ -1,9 +1,9 @@
[DEFAULT]
<% if scope.lookupvar('devices') != :undefined -%>
<% if has_variable?('devices') -%>
devices = <%= devices %>
<% end -%>
bind_ip = <%= storage_local_net_ip %>
<% if scope.lookupvar('bind_port') != :undefined -%>
<% if has_variable?('bind_port') -%>
bind_port = <%= bind_port %>
<% end -%>
mount_check = false

View File

@ -1,9 +1,9 @@
[DEFAULT]
<% if scope.lookupvar('devices') != :undefined -%>
<% if has_variable?('devices') -%>
devices = <%= devices %>
<% end -%>
bind_ip = <%= storage_local_net_ip %>
<% if scope.lookupvar('bind_port') != :undefined -%>
<% if has_variable?('bind_port') -%>
bind_port = <%= bind_port %>
<% end -%>
mount_check = false

View File

@ -1,9 +1,9 @@
[DEFAULT]
<% if scope.lookupvar('devices') != :undefined -%>
<% if has_variable?('devices') -%>
devices = <%= devices %>
<% end -%>
bind_ip = <%= storage_local_net_ip %>
<% if scope.lookupvar('bind_port') != :undefined -%>
<% if has_variable?('bind_port') -%>
bind_port = <%= bind_port %>
<% end -%>
mount_check = false