From 8395818ae9779f695b306f2c20e1a0daf274d34b Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 25 Jan 2013 11:44:04 -0200 Subject: Fixing real host at tunnel class (2) --- manifests/subsystems/tunnel.pp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'manifests/subsystems/tunnel.pp') diff --git a/manifests/subsystems/tunnel.pp b/manifests/subsystems/tunnel.pp index 2253b58..e7e0fe4 100644 --- a/manifests/subsystems/tunnel.pp +++ b/manifests/subsystems/tunnel.pp @@ -22,10 +22,9 @@ class tunnel { Tunnel_server_realize <<| tag == "${::fqdn}" |>> define setup($ensure = present, $user = $hostname, $host, $localport, $hostport, $sshport = '22', $keytype = 'rsa', $root_mail_recipient = hiera('nodo::root_mail_recipient', 'nobody')) { - $dir = "/var/backups/remote/${user}.${::domain}" - $tag = "backupninja-${::fqdn}" - $ssh_dir = "${dir}/.ssh" - $real_host = "${host}.${::domain}" + $dir = "/var/backups/remote/${user}.${::domain}" + $tag = "backupninja-${::fqdn}" + $ssh_dir = "${dir}/.ssh" autossh::tunnel { $name: ensure => $ensure, @@ -38,9 +37,9 @@ class tunnel { sshport => $sshport, } - if !defined(Tunnel_server_realize["${::fqdn}@${real_host}"]) { + if !defined(Tunnel_server_realize["${::hostname}@${host}"]) { # this defines just maps that $host host an user environment for $fdqn - @@tunnel_server_realize { "${fqdn}@${real_host}": + @@tunnel_server_realize { "${::hostname}@${host}": host => $::fqdn, tag => $host, } -- cgit v1.2.3