projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Have name copied to longname if there is no longname
[mirror/dsa-puppet.git]
/
modules
/
portforwarder
/
templates
/
xinetd.erb
diff --git
a/modules/portforwarder/templates/xinetd.erb
b/modules/portforwarder/templates/xinetd.erb
index
6d4f1ea
..
7ff0dfb
100644
(file)
--- a/
modules/portforwarder/templates/xinetd.erb
+++ b/
modules/portforwarder/templates/xinetd.erb
@@
-1,3
+1,8
@@
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+
<%=
lines = []
<%=
lines = []
@@
-14,7
+19,7
@@
template = 'service @@TARGET_HOST@@@@TARGET_PORT@@
group = portforwarder
instances = 10
server = /usr/bin/ssh
group = portforwarder
instances = 10
server = /usr/bin/ssh
- server_args = -o PreferredAuthentications=publickey -o EscapeChar=none -
C @@TARGET_HOST@@ : nothing
+ server_args = -o PreferredAuthentications=publickey -o EscapeChar=none -
o BatchMode=yes -C @@SSH_OPTIONS@@ @@TARGET_HOST@@ forward-to @@TARGET_PORT@@
cps = 0 0
}
'
cps = 0 0
}
'
@@
-25,15
+30,17
@@
if config[fqdn]
target_port = service['target_port']
target_host = service['target_host']
local_bind = service['source_bind_port']
target_port = service['target_port']
target_host = service['target_host']
local_bind = service['source_bind_port']
+ ssh_options = service['ssh_options'] || ""
- lines << "# to #{target_port
}:target_host from local port #{local_bind
}"
+ lines << "# to #{target_port
.to_s}:target_host from local port #{local_bind.to_s
}"
if target_port.nil? or target_host.nil? or local_bind.nil?
lines << "# insufficient config values"
else
p = template.clone
p.gsub!('@@TARGET_HOST@@', target_host)
if target_port.nil? or target_host.nil? or local_bind.nil?
lines << "# insufficient config values"
else
p = template.clone
p.gsub!('@@TARGET_HOST@@', target_host)
- p.gsub!('@@TARGET_PORT@@', target_port)
- p.gsub!('@@LOCLA_BIND@@', local_bind)
+ p.gsub!('@@TARGET_PORT@@', target_port.to_s)
+ p.gsub!('@@LOCAL_BIND@@', local_bind.to_s)
+ p.gsub!('@@SSH_OPTIONS@@', ssh_options.to_s)
lines << p
end
end
lines << p
end
end