1 |
class openssh::ssh_keys_from_ldap inherits server { |
2 |
package { 'python-ldap': } |
3 |
|
4 |
$ldap_pwfile = '/etc/ldap.secret' |
5 |
$ldap_servers = get_ldap_servers() |
6 |
mga_common::local_script { 'ldap-sshkey2file.py': |
7 |
content => template('openssh/ldap-sshkey2file.py'), |
8 |
require => Package['python-ldap'] |
9 |
} |
10 |
|
11 |
cron { 'sshkey2file': |
12 |
command => '/usr/local/bin/ldap-sshkey2file.py', |
13 |
hour => '*', |
14 |
minute => '*/10', |
15 |
user => 'root', |
16 |
environment => 'MAILTO=root', |
17 |
require => Mga_common::Local_script['ldap-sshkey2file.py'], |
18 |
} |
19 |
} |