summaryrefslogtreecommitdiff
path: root/manifests/ssl/deploy_cert.pp
blob: 4bb4365a9f09d0858d206b8ae7087e86dc405694 (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
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
  }

  
}