fix variable in templates
puppet variables aren't variables in templates. Therefore has_variable? is not working as expected.
This commit is contained in:
parent
7cc28431b5
commit
c4e969365e
2 changed files with 3 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
# $name => Name of network=ring
|
||||
define tinc::vpn::conf (
|
||||
$ensure = present,
|
||||
$connectTo = '',
|
||||
$connectTo = 'absent',
|
||||
){
|
||||
|
||||
file { "/etc/tinc/${name}/tinc.conf":
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue