diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/params.pp | 2 | ||||
-rw-r--r-- | manifests/ssl/deploy_cert.pp | 25 |
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 + } + + +} |