summaryrefslogtreecommitdiff
path: root/puppet/modules/site_couchdb/manifests
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2016-10-12 18:41:35 +0200
committervarac <varacanero@zeromail.org>2016-10-18 21:31:32 +0200
commit0b279d8a66293bdf5fe20a77b557055a95a66a46 (patch)
tree06f2e63461375a7ed2ea42b6e756efeb3bfdca13 /puppet/modules/site_couchdb/manifests
parent73ca4fe4b3bad52b1d4c6c950d06b16e2db014ae (diff)
Setup couch for soledad before starting soledad
When the soledad couch user is not present, soledad-server refuses to start, so we need to ensure that couch is setup correctly before starting soledad-server. see https://leap.se/code/issues/8535
Diffstat (limited to 'puppet/modules/site_couchdb/manifests')
-rw-r--r--puppet/modules/site_couchdb/manifests/add_users.pp3
-rw-r--r--puppet/modules/site_couchdb/manifests/create_dbs.pp3
-rw-r--r--puppet/modules/site_couchdb/manifests/setup.pp3
3 files changed, 6 insertions, 3 deletions
diff --git a/puppet/modules/site_couchdb/manifests/add_users.pp b/puppet/modules/site_couchdb/manifests/add_users.pp
index c905316b..f12c5a5e 100644
--- a/puppet/modules/site_couchdb/manifests/add_users.pp
+++ b/puppet/modules/site_couchdb/manifests/add_users.pp
@@ -33,7 +33,8 @@ class site_couchdb::add_users {
roles => '["tokens"]',
pw => $site_couchdb::couchdb_soledad_pw,
salt => $site_couchdb::couchdb_soledad_salt,
- require => Couchdb::Query::Setup['localhost']
+ require => Couchdb::Query::Setup['localhost'],
+ notify => Service['soledad-server'];
}
## webapp couchdb user
diff --git a/puppet/modules/site_couchdb/manifests/create_dbs.pp b/puppet/modules/site_couchdb/manifests/create_dbs.pp
index a2d1c655..ddfb7d65 100644
--- a/puppet/modules/site_couchdb/manifests/create_dbs.pp
+++ b/puppet/modules/site_couchdb/manifests/create_dbs.pp
@@ -44,7 +44,8 @@ class site_couchdb::create_dbs {
## r/w: soledad
couchdb::create_db { 'shared':
members => "{ \"names\": [\"${site_couchdb::couchdb_soledad_user}\"], \"roles\": [\"replication\"] }",
- require => Couchdb::Query::Setup['localhost']
+ require => Couchdb::Query::Setup['localhost'],
+ notify => Service['soledad-server'];
}
## tickets database
diff --git a/puppet/modules/site_couchdb/manifests/setup.pp b/puppet/modules/site_couchdb/manifests/setup.pp
index 84659745..a749c628 100644
--- a/puppet/modules/site_couchdb/manifests/setup.pp
+++ b/puppet/modules/site_couchdb/manifests/setup.pp
@@ -33,7 +33,8 @@ class site_couchdb::setup {
mode => '0400',
owner => 'soledad-admin',
group => 'root',
- require => [ Package['couchdb'], User['soledad-admin'] ];
+ require => [ Package['couchdb'], User['soledad-admin'] ],
+ notify => Service['soledad-server'];
}
}