Commit 2c5b0320 authored by bow's avatar bow
Browse files

Use configuration ip and port when running mongodb shell commands

parent 39dc8441
......@@ -5,7 +5,7 @@
when: mongodb_js_index_script is defined
- name: run database config script
shell: /usr/bin/mongo --quiet 127.0.0.1:27017/sentinel {{ mongodb_misc_dir }}/{{ mongodb_js_index_script }} -u {{ mongodb_root_name }} -p {{ mongodb_root_password }} --authenticationDatabase admin
shell: /usr/bin/mongo --quiet {{ mongodb_conf_bind_ip }}:{{ mongodb_conf_port }}/sentinel {{ mongodb_misc_dir }}/{{ mongodb_js_index_script }} -u {{ mongodb_root_name }} -p {{ mongodb_root_password }} --authenticationDatabase admin
when: mongodb_js_index_script is defined
register: js_index_script
changed_when: js_index_script.stdout != ""
......@@ -23,7 +23,7 @@
when: api_users_exist|changed
- name: run api users config script if required
shell: /usr/bin/mongo --quiet 127.0.0.1:27017/sentinel {{ mongodb_misc_dir }}/sentinelUsersSetup.js -u {{ mongodb_root_name }} -p {{ mongodb_root_password }} --authenticationDatabase admin
shell: /usr/bin/mongo --quiet {{ mongodb_conf_bind_ip }}:{{ mongodb_conf_port }}/sentinel {{ mongodb_misc_dir }}/sentinelUsersSetup.js -u {{ mongodb_root_name }} -p {{ mongodb_root_password }} --authenticationDatabase admin
register: api_users
changed_when: api_users.stdout != ""
when: api_users_exist|changed
......
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