-name:check to see that MongoDB 2.4 isn't installed
-name:check to see that MongoDB 2.4 is not installed
stat:path=/etc/init.d/mongodb
register:mongodb_needs_upgrade
-name:verify 2.4 not installed
fail:msg="MongoDB 2.4 is currently installed. If on a stand alone host (devstack), apt-get remove mongodb-10gen and re-run ansible. if on a cluster, read http://docs.mongodb.org/manual/release-notes/2.6-upgrade/#upgrade-considerations and upgrade to 2.6."
when:mongodb_needs_upgrade.stat.exists
fail:msg="MongoDB 2.4 is currently installed and cannot be safely upgraded in a clustered configuration. Please read http://docs.mongodb.org/manual/release-notes/2.6-upgrade/#upgrade-considerations and upgrade to 2.6."
when:mongodb_needs_upgrade.stat.exists and MONGO_CLUSTERED
-name:remove mongo 2.4 if present
apt:>
pkg=mongodb-10gen
state=absent purge=yes
force=yes
when:mongodb_needs_upgrade.stat.exists and not MONGO_CLUSTERED
-name:install python pymongo for mongo_user ansible module