Updating mongodb packages to latest version #676
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
After having installed and configured mongodb for over a year with this collection, I wanted to upgrade to version 7.0.
There are several ways to achieve this in general, but I wanted to use the collection if possible. The only way i saw was specifying a
specific_mongodb_version
.I added a variable mongod_package_state to be used as state for the package task (Ensure mongod package is installed). This only works for package manager allowing to set the state to latest (I use debian/ubuntu).
This works for me, but may not be the best solution. My problem with this solution is, that mongodb_install notifies a handler defined in mongodb_mongod, which works, but is not really good style. And when using Mongos, a restart of the daemon would also be necessary.
Maybe there is a better / easier way. I'm open to ideas
ISSUE TYPE
COMPONENT NAME
mongodb_install
ADDITIONAL INFORMATION
An upgrade playbook could be like this: