Skip to content

Commit

Permalink
Add custom port in command to check if admin user exists
Browse files Browse the repository at this point in the history
  • Loading branch information
valferon committed Apr 10, 2017
1 parent 2dec490 commit dd7c307
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
- name: Check user admin is exists
command: >
mongo --quiet -u {{ mongodb_user_admin_name }} \
-p {{ mongodb_user_admin_password }} --eval 'db.version()' admin
-p {{ mongodb_user_admin_password }} --port {{ mongodb_net_port }} --eval 'db.version()' admin
register: mongodb_user_admin_check
changed_when: false
always_run: yes # side-effect free, so it can be run in check-mode as well
Expand Down

0 comments on commit dd7c307

Please sign in to comment.