summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2012-11-01 09:20:42 +0100
committervarac <varacanero@zeromail.org>2012-11-01 09:20:42 +0100
commit3fbdba6f03758337350f3e43352f993b74ff72a8 (patch)
tree57ec89d7d80dbbc1f74f24f6a0436e22cfd7bdb1
parent58f60635aa0aa5bb92c2e0aa53c22fe9d3a5c5e1 (diff)
deploy ssl certs
-rw-r--r--manifests/params.pp2
-rw-r--r--manifests/ssl/deploy_cert.pp25
2 files changed, 26 insertions, 1 deletions
diff --git a/manifests/params.pp b/manifests/params.pp
index 4f4487f..67efcd4 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -16,7 +16,7 @@ class couchdb::params {
}
$cert_path = $couchdb_cert_path ? {
- "" => "etc/certs/",
+ "" => "/etc/couchdb",
default => $couchdb_cert_path,
}
diff --git a/manifests/ssl/deploy_cert.pp b/manifests/ssl/deploy_cert.pp
new file mode 100644
index 0000000..4bb4365
--- /dev/null
+++ b/manifests/ssl/deploy_cert.pp
@@ -0,0 +1,25 @@
+define couchdb::ssl::deploy_cert ($cert, $key) {
+
+ file { $couchdb::cert_path:
+ ensure => 'directory',
+ mode => '0600',
+ owner => 'couchdb',
+ group => 'couchdb';
+ }
+
+ file { "$couchdb::cert_path/server_cert.pem":
+ mode => '0644',
+ owner => 'couchdb',
+ group => 'couchdb',
+ content => $cert
+ }
+
+ file { "$couchdb::cert_path/server_key.pem":
+ mode => '0600',
+ owner => 'couchdb',
+ group => 'couchdb',
+ content => $key
+ }
+
+
+}