Closed kkrasnov1 closed 3 years ago
I did this in https://github.com/rhysmeister/AutomatingMongoDBWithAnsible with yum-versionlock. Probably easy enough.
Added in https://github.com/ansible-collections/community.mongodb/pull/370
Could do with user testing. Can be installed from https://github.com/ansible-collections/community.mongodb/releases/tag/latest
I've tested it. It works correctly. Thank you. Have you considered doing this with ansible.builtin.dpkg_selections?
There doesn't seem to be an equivalent for RedHat systems so I'd rather keep it in one place for now. Maybe in the future.
Cheers,
Rhys
SUMMARY
According to the documentation https://docs.mongodb.com/v4.4/tutorial/install-mongodb-on-ubuntu/, it is recommended to hold package versions in order to unintentionally update MongoDB for specific version:
Optional. Although you can specify any available version of MongoDB, apt-get will upgrade the packages when a newer version becomes available. To prevent unintended upgrades, you can pin the package at the currently installed version:
Please add the hold parameter for mongodb_install.
ISSUE TYPE
COMPONENT NAME
mongodb_install
ADDITIONAL INFORMATION