summaryrefslogtreecommitdiff
path: root/puppet/modules/site_couchdb/manifests/apache_ssl_proxy.pp
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2012-11-06 11:09:45 +0100
committervarac <varacanero@zeromail.org>2012-11-06 11:09:45 +0100
commit1493ca871a596380f3db6feeb2c0621a597d4f30 (patch)
treeae5dda6dba81b77ca159cd1aa9e0bb32a13a3da7 /puppet/modules/site_couchdb/manifests/apache_ssl_proxy.pp
parente6d9dca1e6c695e52f5052cb6877787e13bb0fb2 (diff)
parent7ca4f22e4cd76d986fece61674f487809d1369c6 (diff)
Merge branch 'feature/couchdb' into develop
Conflicts: puppet/modules/site_shorewall/manifests/eip.pp
Diffstat (limited to 'puppet/modules/site_couchdb/manifests/apache_ssl_proxy.pp')
-rw-r--r--puppet/modules/site_couchdb/manifests/apache_ssl_proxy.pp35
1 files changed, 35 insertions, 0 deletions
diff --git a/puppet/modules/site_couchdb/manifests/apache_ssl_proxy.pp b/puppet/modules/site_couchdb/manifests/apache_ssl_proxy.pp
new file mode 100644
index 00000000..87b21e62
--- /dev/null
+++ b/puppet/modules/site_couchdb/manifests/apache_ssl_proxy.pp
@@ -0,0 +1,35 @@
+define site_couchdb::apache_ssl_proxy ($key, $cert) {
+
+ include apache::ssl
+ apache::module {
+ 'rewrite': ensure => present;
+ 'proxy': ensure => present;
+ 'proxy_http': ensure => present;
+ }
+ apache::vhost::file { 'couchdb_proxy': }
+ # prevent 0-default.conf and 0-default_ssl.conf from apache module
+ # from starting on port 80 / 443
+ file { '/etc/apache2/ports.conf':
+ content => '',
+ mode => '0644',
+ owner => 'root',
+ group => 'root',
+ }
+
+ file { '/etc/couchdb/server_cert.pem':
+ mode => '0644',
+ owner => 'couchdb',
+ group => 'couchdb',
+ content => $cert,
+ notify => Service[apache],
+ }
+
+ file { '/etc/couchdb/server_key.pem':
+ mode => '0600',
+ owner => 'couchdb',
+ group => 'couchdb',
+ content => $key,
+ notify => Service[apache],
+ }
+
+}