File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 6
6
service : name={{ mongodb_daemon_name }} state=restarted
7
7
when : mongodb_manage_service
8
8
9
+ - name : wait MongoDB port is listening
10
+ wait_for : host="{{ mongodb_conf_bind_ip }}"port="{{ mongodb_conf_port }}" delay=5 state=started
11
+
9
12
- name : get pid of mongodb for non daemon mode
10
13
shell : " pidof mongod"
11
14
register : pidof_mongod
64
67
service : name={{ mongodb_daemon_name }} state=restarted
65
68
when : mongodb_manage_service
66
69
70
+ - name : wait MongoDB port is listening
71
+ wait_for : host="{{ mongodb_conf_bind_ip }}"port="{{ mongodb_conf_port }}" delay=5 state=started
72
+
67
73
- name : stop mongodb if was not started
68
74
shell : " kill {{ pidof_mongod.stdout }}"
69
75
when : mongodb_manage_service == false and pidof_mongod.rc == 0
You can’t perform that action at this time.
0 commit comments