summaryrefslogtreecommitdiff
path: root/manifests/ssl/deploy_cert.pp
blob: 4e9c1582916566d9d7f550afeaffa819a9d055da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
define couchdb::ssl::deploy_cert ($cert, $key) {
include couchdb::params
  file { 'couchdb_cert_directory':
    path    => "$couchdb::params::cert_path",
    ensure  => 'directory',
    mode    => '0600',
    owner   => 'couchdb',
    group   => 'couchdb';
  }

  file { 'couchdb_cert"':
    path    => "$couchdb::params::cert_path/server_cert.pem",
    mode    => '0644',
    owner   => 'couchdb',
    group   => 'couchdb',
    content => $cert
  }

  file { 'couchdb_key':
    path    => "$couchdb::params::cert_path/server_key.pem",
    mode    => '0600',
    owner   => 'couchdb',
    group   => 'couchdb',
    content => $key
  }

  
}