aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-01-25 11:41:32 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-01-25 11:41:32 -0200
commit10a6a1ed421e4d01113c807cd6d75c5be468fd23 (patch)
treea3a281a9ea8c5fc8dda9379fe85a19cc8ac6f3db /manifests
parent56521d2de636f5869de3fd47587faeacc27017ec (diff)
downloadpuppet-nodo-10a6a1ed421e4d01113c807cd6d75c5be468fd23.tar.gz
puppet-nodo-10a6a1ed421e4d01113c807cd6d75c5be468fd23.tar.bz2
Fixing real host at tunnel class
Diffstat (limited to 'manifests')
-rw-r--r--manifests/subsystems/tunnel.pp13
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',