diff options
author | Michael Scherer <misc@mageia.org> | 2010-11-21 16:45:39 +0000 |
---|---|---|
committer | Michael Scherer <misc@mageia.org> | 2010-11-21 16:45:39 +0000 |
commit | 1588ae5065c48b212a3a0f1bc80ea3044e92cfc7 (patch) | |
tree | 52fb5f33952621b3a569cdb8fd7e3b5ea75d9dcc /modules/openldap/manifests/init.pp | |
parent | 7792fe54a1e32064e9b821dd8dbc195db51dfbb0 (diff) | |
download | puppet-1588ae5065c48b212a3a0f1bc80ea3044e92cfc7.tar puppet-1588ae5065c48b212a3a0f1bc80ea3044e92cfc7.tar.gz puppet-1588ae5065c48b212a3a0f1bc80ea3044e92cfc7.tar.bz2 puppet-1588ae5065c48b212a3a0f1bc80ea3044e92cfc7.tar.xz puppet-1588ae5065c48b212a3a0f1bc80ea3044e92cfc7.zip |
- create a self signed certificate if not present ( for test vm )
Diffstat (limited to 'modules/openldap/manifests/init.pp')
-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/ |