Skip to content

Commit dd7c307

Browse files
committed
Add custom port in command to check if admin user exists
1 parent 2dec490 commit dd7c307

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tasks/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
- name: Check user admin is exists
2626
command: >
2727
mongo --quiet -u {{ mongodb_user_admin_name }} \
28-
-p {{ mongodb_user_admin_password }} --eval 'db.version()' admin
28+
-p {{ mongodb_user_admin_password }} --port {{ mongodb_net_port }} --eval 'db.version()' admin
29+
2930
register: mongodb_user_admin_check
3031
changed_when: false
3132
always_run: yes # side-effect free, so it can be run in check-mode as well

0 commit comments

Comments
 (0)