diff options
author | Antoine Beaupré <anarcat@koumbit.org> | 2015-06-18 16:07:18 -0400 |
---|---|---|
committer | Antoine Beaupré <anarcat@koumbit.org> | 2015-06-18 17:15:27 -0400 |
commit | cb9bceb04e35314c461a7cd1f9dff3561c5cd135 (patch) | |
tree | d46682be1ccbe5ba89caa54b3d18f7952d296e3a /manifests/autossh.pp | |
parent | da1be21ebb354304b2844c6ffe3251d3df1a8597 (diff) | |
download | puppet-sshd-cb9bceb04e35314c461a7cd1f9dff3561c5cd135.tar.gz puppet-sshd-cb9bceb04e35314c461a7cd1f9dff3561c5cd135.tar.bz2 |
allow customizing user
Diffstat (limited to 'manifests/autossh.pp')
-rw-r--r-- | manifests/autossh.pp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/manifests/autossh.pp b/manifests/autossh.pp index 590f28b..fadc575 100644 --- a/manifests/autossh.pp +++ b/manifests/autossh.pp @@ -1,6 +1,7 @@ class sshd::autossh($host, - $port = undef, # this should be a remote->local hash - $remote_user = undef, + $port = undef, # this should be a remote->local hash + $remote_user = undef, + $user = 'root', ) { if $port { $port_ensure = $port @@ -21,7 +22,7 @@ class sshd::autossh($host, source => 'puppet:///modules/sshd/autossh.init.d'; '/etc/default/autossh': mode => '0444', - content => "DAEMON_ARGS='-o ServerAliveInterval=15 -o ServerAliveCountMax=4 -q -N -R $port_ensure:localhost:22 $remote_user_ensure@$host'\n"; + content => "USER=$user\nDAEMON_ARGS='-o ServerAliveInterval=15 -o ServerAliveCountMax=4 -q -N -R $port_ensure:localhost:22 $remote_user_ensure@$host'\n"; } package { 'autossh': ensure => present, |