fix variable in templates

puppet variables aren't variables in templates. Therefore
has_variable? is not working as expected.
This commit is contained in:
mh 2010-09-01 10:52:35 +02:00
parent 7cc28431b5
commit c4e969365e
2 changed files with 3 additions and 3 deletions

View file

@ -1,7 +1,7 @@
# $name => Name of network=ring
define tinc::vpn::conf (
$ensure = present,
$connectTo = '',
$connectTo = 'absent',
){
file { "/etc/tinc/${name}/tinc.conf":

View file

@ -5,8 +5,8 @@ Device = /dev/net/tun
Mode = switch
#Mode = router
<% if has_variable?(connectTo) -%>
ConnectTo = <%= connectTo %>
<% unless connect_to.to_s == 'absent' -%>
ConnectTo = <%= connect_to %>
<% end -%>
#GraphDumpFile = /tmp/tincdump