summaryrefslogtreecommitdiff
path: root/puppet/modules/site_couchdb
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/site_couchdb')
-rw-r--r--puppet/modules/site_couchdb/files/designs/identities/Identity.json4
-rw-r--r--puppet/modules/site_couchdb/files/designs/users/User.json10
-rw-r--r--puppet/modules/site_couchdb/manifests/designs.pp1
-rw-r--r--puppet/modules/site_couchdb/manifests/init.pp7
4 files changed, 10 insertions, 12 deletions
diff --git a/puppet/modules/site_couchdb/files/designs/identities/Identity.json b/puppet/modules/site_couchdb/files/designs/identities/Identity.json
index 8cf8c39b..2ac092ab 100644
--- a/puppet/modules/site_couchdb/files/designs/identities/Identity.json
+++ b/puppet/modules/site_couchdb/files/designs/identities/Identity.json
@@ -15,7 +15,7 @@
"reduce": "_sum"
},
"pgp_key_by_email": {
- "map": " function(doc) {\n if (doc.type != 'Identity') {\n return;\n }\n emit(doc.address, doc.keys[\"pgp\"]);\n }\n"
+ "map": " function(doc) {\n if (doc.type != 'Identity') {\n return;\n }\n if (typeof doc.keys === \"object\") {\n emit(doc.address, doc.keys[\"pgp\"]);\n }\n }\n"
},
"disabled": {
"map": " function(doc) {\n if (doc.type != 'Identity') {\n return;\n }\n if (typeof doc.user_id === \"undefined\") {\n emit(doc._id, 1);\n }\n }\n"
@@ -24,5 +24,5 @@
"map": " function(doc) {\n if (doc['type'] == 'Identity') {\n emit(doc._id, null);\n }\n }\n"
}
},
- "couchrest-hash": "5b0ece9d28b3025d18ea71fddf3a532f"
+ "couchrest-hash": "e9004d70e26770c621a9667536429a68"
} \ No newline at end of file
diff --git a/puppet/modules/site_couchdb/files/designs/users/User.json b/puppet/modules/site_couchdb/files/designs/users/User.json
index c500822b..c99666cb 100644
--- a/puppet/modules/site_couchdb/files/designs/users/User.json
+++ b/puppet/modules/site_couchdb/files/designs/users/User.json
@@ -9,18 +9,10 @@
"all": {
"map": " function(doc) {\n if (doc['type'] == 'User') {\n emit(doc._id, null);\n }\n }\n"
},
- "by_alias": {
- "map": "function(doc) {\n if (doc.type != 'User') {\n return;\n }\n doc.email_aliases.forEach(function(alias){\n emit(alias.username, 1);\n });\n}\n",
- "reduce": "function(key, values, rereduce) { return sum(values); }"
- },
- "by_login_or_alias": {
- "map": "function(doc) {\n if (doc.type != 'User') {\n return;\n }\n emit(doc.login, 1);\n doc.email_aliases.forEach(function(alias){\n emit(alias.username, 1);\n });\n}\n",
- "reduce": "function(key, values, rereduce) { return sum(values); }"
- },
"by_created_at": {
"map": " function(doc) {\n if ((doc['type'] == 'User') && (doc['created_at'] != null)) {\n emit(doc['created_at'], 1);\n }\n }\n",
"reduce": "_sum"
}
},
- "couchrest-hash": "26adb5c9480663de3fe60d959b60a7b2"
+ "couchrest-hash": "3bdbcd85b928ad911e0c89a8924e015c"
} \ No newline at end of file
diff --git a/puppet/modules/site_couchdb/manifests/designs.pp b/puppet/modules/site_couchdb/manifests/designs.pp
index 2d0a8326..83d6c8cd 100644
--- a/puppet/modules/site_couchdb/manifests/designs.pp
+++ b/puppet/modules/site_couchdb/manifests/designs.pp
@@ -7,6 +7,7 @@ class site_couchdb::designs {
ensure => directory,
source => 'puppet:///modules/site_couchdb/designs',
recurse => true,
+ purge => true,
mode => '0755'
}
diff --git a/puppet/modules/site_couchdb/manifests/init.pp b/puppet/modules/site_couchdb/manifests/init.pp
index fd7e67a1..137b661f 100644
--- a/puppet/modules/site_couchdb/manifests/init.pp
+++ b/puppet/modules/site_couchdb/manifests/init.pp
@@ -50,7 +50,12 @@ class site_couchdb {
chttpd_bind_address => '127.0.0.1'
}
- class { 'couchdb::bigcouch::package::cloudant': }
+ # ensure that we don't have leftovers from previous installations
+ # where we installed the cloudant bigcouch package
+ # https://leap.se/code/issues/4971
+ class { 'couchdb::bigcouch::package::cloudant':
+ ensure => absent
+ }
Class['site_config::default']
-> Class['couchdb::bigcouch::package::cloudant']