I just opened a PR to add state to the easy_install resource at https://github.com/ansible/ansible-modules-core/pull/1383 for this.
State may be either present or latest. If it is latest, the --upgrade
option is passed to the easy_install executable when it is run.
I know easy_install is outdated and all, but if it’s going to be available, shouldn’t it be fully functional? If y’all agree with that, I can see about adding other options as well and making ‘state’ == ‘absent’ work.
Personally I would love to move easy_install to extras and only have
pip in core. But I don't think we've gotten to the point where we can
set expectations properly when doing this yet. I like
state=present|latest and will try to merge the PR shortly. Not sure
about state=absent.... One of the drawbacks of easy_install vs pip is
that easy_install doesn't make any effort to understand how to
uninstall packages. So I'm not sure if we should attempt to shoe-horn
a lot of extra code into the easy_install module to make that work or
just tell people to use the pip module to uninstall.
-Toshio
The only reason I’m even touching easy_install is that pip does not install correctly via apt from the ‘python-pip’ package in Ubuntu 14.04, so I’m installing it with easy_install and then never touching easy_install again.