From 10a6a1ed421e4d01113c807cd6d75c5be468fd23 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 25 Jan 2013 11:41:32 -0200 Subject: Fixing real host at tunnel class --- manifests/subsystems/tunnel.pp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'manifests/subsystems') diff --git a/manifests/subsystems/tunnel.pp b/manifests/subsystems/tunnel.pp index 763383b..2253b58 100644 --- a/manifests/subsystems/tunnel.pp +++ b/manifests/subsystems/tunnel.pp @@ -22,9 +22,10 @@ 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" + $dir = "/var/backups/remote/${user}.${::domain}" + $tag = "backupninja-${::fqdn}" + $ssh_dir = "${dir}/.ssh" + $real_host = "${host}.${::domain}" autossh::tunnel { $name: ensure => $ensure, @@ -40,7 +41,7 @@ class tunnel { if !defined(Tunnel_server_realize["${::fqdn}@${real_host}"]) { # this defines just maps that $host host an user environment for $fdqn @@tunnel_server_realize { "${fqdn}@${real_host}": - host => $fqdn, + host => $::fqdn, tag => $host, } } @@ -108,7 +109,7 @@ class tunnel { owner => root, group => root, mode => 0644, - content => "${fqdn}\n", + content => "${::fqdn}\n", notify => Service["nullmailer"], } @@ -139,7 +140,7 @@ class tunnel { } tunnel::setup { "smtp": - host => "${name}.${domain}", + host => "${name}.${::domain}", sshport => "${sshport}", localport => '2525', hostport => '25', -- cgit v1.2.3