Commit cb391060 by e0d

Building the mongo url dynamically.

parent 357f8ce9
......@@ -13,10 +13,13 @@ forum_path: "{{ forum_code_dir }}/bin:{{ forum_rbenv_bin }}:{{ forum_rbenv_shims
FORUM_MONGO_USER: "cs_comments_service"
FORUM_MONGO_PASSWORD: "password"
FORUM_MONGO_HOST: "localhost"
FORUM_MONGO_HOSTS:
- "localhost"
FORUM_MONGO_PORT: "27017"
FORUM_MONGO_DATABASE: "cs_comments_service"
FORUM_MONGO_URL: "mongodb://{{ FORUM_MONGO_USER }}:{{ FORUM_MONGO_PASSWORD }}@{{ FORUM_MONGO_HOST }}:{{ FORUM_MONGO_PORT }}/{{ FORUM_MONGO_DATABASE }}"
FORUM_MONGO_URL: "mongodb://{{ FORUM_MONGO_USER }}:{{ FORUM_MONGO_PASSWORD }}@{%- for host in FORUM_MONGO_HOSTS -%}
{{host}}:{{ FORUM_MONGO_PORT }}{%- if not loop.last -%},{%- endif -%}
{%- endfor -%}/{{ FORUM_MONGO_DATABASE }}"
FORUM_SINATRA_ENV: "development"
FORUM_RACK_ENV: "development"
FORUM_NGINX_PORT: "18080"
......@@ -49,9 +52,9 @@ forum_unicorn_port: "4567"
#
# The following services should be listening on the associated
# ports when the role has been successfully created.
# ports when the role has been successfully created. Note that
# connectivity to Mongo is also tested, but separately.
#
forum_services:
- {service: "sinatra", host: "localhost", port: "{{ forum_unicorn_port }}"}
- {service: "mongo", host: "{{ FORUM_MONGO_HOST }}", port: "{{ FORUM_MONGO_PORT }}"}
- {service: "elasticsearch", host: "{{ FORUM_ELASTICSEARCH_HOST }}", port: "{{ FORUM_ELASTICSEARCH_PORT }}"}
\ No newline at end of file
......@@ -7,3 +7,11 @@
tags:
- forum
- test
- name: forum | test that mongo replica set members are listing
wait_for: port={{ FORUM_MONGO_PORT }} host={{ item }} timeout=30
with_items: "{{ FORUM_MONGO_HOSTS }}"
when: not devstack
tags:
- forum
- test
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment