aboutsummaryrefslogtreecommitdiffstats
path: root/modules/openssh/manifests/ssh_keys_from_ldap.pp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/openssh/manifests/ssh_keys_from_ldap.pp')
-rw-r--r--modules/openssh/manifests/ssh_keys_from_ldap.pp7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/openssh/manifests/ssh_keys_from_ldap.pp b/modules/openssh/manifests/ssh_keys_from_ldap.pp
index e155ddf6..2e836026 100644
--- a/modules/openssh/manifests/ssh_keys_from_ldap.pp
+++ b/modules/openssh/manifests/ssh_keys_from_ldap.pp
@@ -8,14 +8,17 @@ if versioncmp($::lsbdistrelease, '7') < 0 {
$ldap_pwfile = '/etc/ldap.secret'
$nslcd_conf_file = '/etc/nslcd.conf'
$ldap_servers = get_ldap_servers()
+if versioncmp($::lsbdistrelease, '7') < 0 {
mga_common::local_script { 'ldap-sshkey2file.py':
content => template('openssh/ldap-sshkey2file.py'),
-if versioncmp($::lsbdistrelease, '7') < 0 {
require => Package['python2-ldap']
+ }
} else {
+ mga_common::local_script { 'ldap-sshkey2file.py':
+ content => template('openssh/ldap-sshkey2file.py'),
require => Package['python-ldap']
-}
}
+}
cron { 'sshkey2file':
command => '/bin/bash -c "/usr/local/bin/ldap-sshkey2file.py && ( [[ -f /usr/bin/mgagit && -d /var/lib/git/.gitolite ]] && /bin/su -c \'/usr/bin/mgagit glrun\' - git ) ||:"',