diff options
-rw-r--r-- | manifests/subsystems/tunnel.pp | 13 |
1 files changed, 7 insertions, 6 deletions
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', |