/[adm]/puppet/modules/openssh/manifests/ssh_keys_from_ldap.pp
ViewVC logotype

Annotation of /puppet/modules/openssh/manifests/ssh_keys_from_ldap.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2908 - (hide annotations) (download)
Mon Dec 10 19:19:50 2012 UTC (11 years, 3 months ago) by boklm
File size: 1094 byte(s)
Local_script -> Mga-common::Local_script
1 misc 2702 class openssh::ssh_keys_from_ldap($symlink_users = [],
2     $config = '') inherits server {
3     # root account authorized_keys will be symlinked
4     # if you want to add symlink on other accounts, use $symlink_users parameter
5    
6     File ['/etc/ssh/sshd_config'] {
7     content => template('openssh/sshd_config','openssh/sshd_config_ldap')
8     }
9    
10     package { 'python-ldap': }
11    
12 misc 2703 include openssh::pubkeys_directory
13 misc 2715 $pubkeys_directory = $openssh::pubkeys_directory::pubkeys_directory
14    
15 misc 2702 symlink_user { $symlink_users: }
16    
17     $ldap_pwfile = '/etc/ldap.secret'
18     $ldap_servers = get_ldap_servers()
19 boklm 2896 mga-common::local_script { 'ldap-sshkey2file.py':
20 misc 2702 content => template('openssh/ldap-sshkey2file.py'),
21     require => Package['python-ldap']
22     }
23    
24     cron { 'sshkey2file':
25     command => '/usr/local/bin/ldap-sshkey2file.py',
26     hour => '*',
27     minute => '*/10',
28     user => 'root',
29     environment => 'MAILTO=root',
30 boklm 2908 require => Mga-common::Local_script['ldap-sshkey2file.py'],
31 misc 2702 }
32     }

  ViewVC Help
Powered by ViewVC 1.1.30