Allow multiple tunnels on the same host
This allows multiple autossh::tunnel defines to be instanciated on the same host without puppet erroring with multiple services of the same name. Change-Id: I0a54629137f668c5d83e110312cbd26a87601bc0
This commit is contained in:
parent
7d232b51cc
commit
3225dc61a2
|
@ -26,8 +26,9 @@ define autossh::tunnel (
|
|||
$monitoring_port = 0,
|
||||
$run_in_background = true,
|
||||
) {
|
||||
service { '/usr/lib/autossh':
|
||||
service { "autossh-service-${title}":
|
||||
ensure => $ensure,
|
||||
name => '/usr/lib/autossh',
|
||||
start => template('autossh/autossh-command.erb'),
|
||||
stop => 'AUTOSSH_PID=`pidof autossh` && CHILD_PID=`pgrep -P $AUTOSSH_PID` && kill -9 $AUTOSSH_PID && kill -9 $CHILD_PID',
|
||||
provider => base,
|
||||
|
|
Loading…
Reference in New Issue