blob: e155ddf6a28fb328afd3e078a8dd721b89fa9424 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
class openssh::ssh_keys_from_ldap inherits server {
if versioncmp($::lsbdistrelease, '7') < 0 {
package { 'python2-ldap': }
} else {
package { 'python-ldap': }
}
$ldap_pwfile = '/etc/ldap.secret'
$nslcd_conf_file = '/etc/nslcd.conf'
$ldap_servers = get_ldap_servers()
mga_common::local_script { 'ldap-sshkey2file.py':
content => template('openssh/ldap-sshkey2file.py'),
if versioncmp($::lsbdistrelease, '7') < 0 {
require => Package['python2-ldap']
} else {
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 ) ||:"',
hour => '*',
minute => '*/10',
user => 'root',
environment => 'MAILTO=root',
require => Mga_common::Local_script['ldap-sshkey2file.py'],
}
}
|