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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2703 - (show annotations) (download)
Mon Apr 2 11:05:27 2012 UTC (9 years, 5 months ago) by misc
File size: 997 byte(s)
split a module pubkeys_directory, so we can include it from symlink_user and make sure everything is correctly declared
1 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 include openssh::pubkeys_directory
13 symlink_user { $symlink_users: }
14
15 $ldap_pwfile = '/etc/ldap.secret'
16 $ldap_servers = get_ldap_servers()
17 local_script { 'ldap-sshkey2file.py':
18 content => template('openssh/ldap-sshkey2file.py'),
19 require => Package['python-ldap']
20 }
21
22 cron { 'sshkey2file':
23 command => '/usr/local/bin/ldap-sshkey2file.py',
24 hour => '*',
25 minute => '*/10',
26 user => 'root',
27 environment => 'MAILTO=root',
28 require => Local_script['ldap-sshkey2file.py'],
29 }
30 }

  ViewVC Help
Powered by ViewVC 1.1.28