summaryrefslogtreecommitdiff
path: root/puppet/modules/soledad
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2013-09-20 18:58:29 +0200
committervarac <varacanero@zeromail.org>2013-09-20 18:58:29 +0200
commit0bf2c2eeaf5f8b683454ce0d0dbe88bb6f17c08f (patch)
treea5252934c67cb2316e8d7163c5170f58e3f51491 /puppet/modules/soledad
parente182d12c72743491805a3873e8b6cd804fe5394c (diff)
parent486a9cd3b7bd8d643a9623fd40db2286cdf52fc8 (diff)
Merge branch 'feature/3832_Unify_x509_certs__keys_and_ca' into develop
Diffstat (limited to 'puppet/modules/soledad')
-rw-r--r--puppet/modules/soledad/manifests/server.pp32
-rw-r--r--puppet/modules/soledad/templates/default-soledad.erb4
2 files changed, 12 insertions, 24 deletions
diff --git a/puppet/modules/soledad/manifests/server.pp b/puppet/modules/soledad/manifests/server.pp
index 393d416a..0c073443 100644
--- a/puppet/modules/soledad/manifests/server.pp
+++ b/puppet/modules/soledad/manifests/server.pp
@@ -9,29 +9,12 @@ class soledad::server {
$couchdb_user = $couchdb['couchdb_admin_user']['username']
$couchdb_password = $couchdb['couchdb_admin_user']['password']
- $x509 = hiera('x509')
- $x509_key = $x509['key']
- $x509_cert = $x509['cert']
- $x509_ca = $x509['ca_cert']
+ include site_config::x509::cert_key
+ include site_config::x509::ca
$soledad = hiera('soledad')
$soledad_port = $soledad['port']
- x509::key { 'soledad':
- content => $x509_key,
- notify => Service['soledad-server'];
- }
-
- x509::cert { 'soledad':
- content => $x509_cert,
- notify => Service['soledad-server'];
- }
-
- x509::ca { 'soledad':
- content => $x509_ca,
- notify => Service['soledad-server'];
- }
-
#
# SOLEDAD CONFIG
#
@@ -47,8 +30,9 @@ class soledad::server {
package { 'soledad-server':
ensure => latest,
- require => [ Class['site_apt::preferences::twisted'],
- Class['site_apt::leap_repo'] ];
+ require => [
+ Class['site_apt::preferences::twisted'],
+ Class['site_apt::leap_repo'] ];
}
file { '/etc/default/soledad':
@@ -65,7 +49,11 @@ class soledad::server {
enable => true,
hasstatus => true,
hasrestart => true,
- require => [ Class['soledad'], Package['soledad-server'] ];
+ require => [
+ Class['soledad'],
+ Package['soledad-server'],
+ Class['Site_config::X509::Cert_key'],
+ Class['Site_config::X509::Ca'] ];
}
include site_shorewall::soledad
diff --git a/puppet/modules/soledad/templates/default-soledad.erb b/puppet/modules/soledad/templates/default-soledad.erb
index fd38903a..32504e38 100644
--- a/puppet/modules/soledad/templates/default-soledad.erb
+++ b/puppet/modules/soledad/templates/default-soledad.erb
@@ -1,5 +1,5 @@
# this file is managed by puppet
START=yes
-CERT_PATH=/etc/x509/certs/soledad.crt
-PRIVKEY_PATH=/etc/x509/keys/soledad.key
+CERT_PATH=<%= scope.lookupvar('x509::variables::certs') %>/<%= scope.lookupvar('site_config::params::cert_name') %>.crt
+PRIVKEY_PATH=<%= scope.lookupvar('x509::variables::keys') %>/<%= scope.lookupvar('site_config::params::cert_name') %>.key
HTTPS_PORT=<%=@soledad_port%>