class openssh::ssh_keys_from_ldap inherits server { 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'), 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'], } }