Commit ee6ce0ea authored by Oliver Lowe's avatar Oliver Lowe
Browse files

Ensure we can run mongodb compat command

This is a bit of a hack. The mongodb service restarts successfully,
but it's not ready straight away to receive commands straight away.
So just wait a second, then issue the set compatibility command.
parent 86b18340
......@@ -5,6 +5,10 @@
enabled: yes
state: restarted
- name: pause
pause:
seconds: 1
- name: set mongodb compatibility
command: 'mongo --eval "db.adminCommand( { setFeatureCompatibilityVersion: \"4.0\" } )"'
......
......@@ -23,6 +23,7 @@
name: mongodb-org
notify:
- restart mongod
- pause # hack to ensure we can issue command to fully initialised mongodb
- set mongodb compatibility
- name: elasticsearch apt repo key
......
Supports Markdown
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