diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-01-25 11:41:32 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-01-25 11:41:32 -0200 |
commit | 10a6a1ed421e4d01113c807cd6d75c5be468fd23 (patch) | |
tree | a3a281a9ea8c5fc8dda9379fe85a19cc8ac6f3db /manifests/subsystems | |
parent | 56521d2de636f5869de3fd47587faeacc27017ec (diff) | |
download | puppet-nodo-10a6a1ed421e4d01113c807cd6d75c5be468fd23.tar.gz puppet-nodo-10a6a1ed421e4d01113c807cd6d75c5be468fd23.tar.bz2 |
Fixing real host at tunnel class
Diffstat (limited to 'manifests/subsystems')
-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', |