diff options
-rw-r--r-- | provider_base/services/soledad.json | 2 | ||||
-rw-r--r-- | puppet/modules/soledad/manifests/server.pp | 11 | ||||
-rw-r--r-- | puppet/modules/soledad/templates/default-soledad.erb | 4 |
3 files changed, 14 insertions, 3 deletions
diff --git a/provider_base/services/soledad.json b/provider_base/services/soledad.json index e26e2667..6b41c128 100644 --- a/provider_base/services/soledad.json +++ b/provider_base/services/soledad.json @@ -1,6 +1,6 @@ { "soledad": { - "port": 2424, + "port": 2323, "couchdb_admin_user": "= global.services[:couchdb].couch.users[:admin]", "require_couchdb": "=> assert %(services.include? 'couchdb')" }, diff --git a/puppet/modules/soledad/manifests/server.pp b/puppet/modules/soledad/manifests/server.pp index 00fee4ac..ba482f29 100644 --- a/puppet/modules/soledad/manifests/server.pp +++ b/puppet/modules/soledad/manifests/server.pp @@ -13,6 +13,9 @@ class soledad::server { $x509_cert = $x509['cert'] $x509_ca = $x509['ca_cert'] + $soledad = hiera('soledad') + $soledad_port = $soledad['port'] + x509::key { 'soledad': content => $x509_key, notify => Service['soledad-server']; @@ -46,8 +49,12 @@ class soledad::server { } file { '/etc/default/soledad': - content => "CERT_PATH=/etc/x509/certs/soledad.crt\nPRIVKEY_PATH=/etc/x509/keys/soledad.key\n", - require => Package['soledad-server'] + content => template('soledad/default-soledad.erb'), + owner => 'soledad', + group => 'soledad', + mode => '0600', + notify => Service['soledad-server'], + require => Class['soledad']; } service { 'soledad-server': diff --git a/puppet/modules/soledad/templates/default-soledad.erb b/puppet/modules/soledad/templates/default-soledad.erb new file mode 100644 index 00000000..da85338a --- /dev/null +++ b/puppet/modules/soledad/templates/default-soledad.erb @@ -0,0 +1,4 @@ +# this file is managed by puppet +CERT_PATH=/etc/x509/certs/soledad.crt +PRIVKEY_PATH=/etc/x509/keys/soledad.key +HTTPS_PORT=<%=@soledad_port%> |