diff options
Diffstat (limited to 'modules/openldap')
-rw-r--r-- | modules/openldap/manifests/init.pp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/openldap/manifests/init.pp b/modules/openldap/manifests/init.pp index 4270a885..ebdf2a4f 100644 --- a/modules/openldap/manifests/init.pp +++ b/modules/openldap/manifests/init.pp @@ -9,6 +9,19 @@ class openldap { subscribe => [ Package['openldap-servers']], path => "/etc/init.d/ldap" } + + file {"/etc/ssl/openldap/": + ensure => directory, + owner => root, + group => root, + mode => 755, + } + + $pem_file = 'ldap.pem' + exec { "openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout $pem_file -out $pem_file -subj '/CN=ldap.$domain'": + cwd => "/etc/ssl/openldap/", + creates => "/etc/ssl/openldap/$pem_file" + } } # /etc/ |