This is an automated email from the ASF dual-hosted git repository.
cbickel pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new 3edd205 Allow additional namespaces for subjects created in
initdb.yml. (#3981)
3edd205 is described below
commit 3edd205b143633ca5714494d8cc039349a9e8bf2
Author: Vadim Raskin <[email protected]>
AuthorDate: Mon Oct 15 15:34:26 2018 +0200
Allow additional namespaces for subjects created in initdb.yml. (#3981)
* Allow additional namespaces for subjects created in initdb.yml
* Add extra namespaces before adding main namespace
---
ansible/tasks/initdb.yml | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/ansible/tasks/initdb.yml b/ansible/tasks/initdb.yml
index 16608ae..cc2831a 100644
--- a/ansible/tasks/initdb.yml
+++ b/ansible/tasks/initdb.yml
@@ -34,10 +34,20 @@
{
"_id": "{{ item }}",
"subject": "{{ item }}",
- "namespaces": [{
- "name": "{{ item }}",
- "uuid": "{{ key.split(":")[0] }}",
- "key": "{{ key.split(":")[1] }}"
- }]
+ "namespaces": [
+ {% if 'extraNamespaces' in db and item in db.extraNamespaces %}
+ {% for ns in db.extraNamespaces[item] %}
+ {
+ "name": "{{ item }}{{ ns.postfix }}",
+ "uuid": "{{ ns.uuid }}",
+ "key": "{{ ns.key }}"
+ },
+ {% endfor %}
+ {% endif %}
+ {
+ "name": "{{ item }}",
+ "uuid": "{{ key.split(":")[0] }}",
+ "key": "{{ key.split(":")[1] }}"
+ }]
}
with_items: "{{ db.authkeys }}"