So, I've been thinking about creating a general purpose http client URI/URL module for ansible; allowing ansible to interact with web services. Some example use cases I've thought of:
* Create a JIRA ticket on some condition using JIRA's RESTful API
* Delete/Update said JIRA ticket
* Add a host to 'your-favorite' monitoring/CMDB system via it's web API. (I use zabbix which has such an API.)
* Delete said host from the monitoring/CMDB system.
* Sending ansible 'setup' module json output to some yet created webservice for host-inventory cataloging.
* Generally, just allowing ansible to interact with web-services.
Still in the planning stages but the biggest problem I see right now is that the standard & included HTTP client libraries in python have some rather big holes.
urllib2 only supports GET and POST HTTP methods.
httplib doesn't appear to support authentication, proxies, compression, cookies or redirects.
That leaves either non-standard python http client libraries or curl. Sticking with python will certainly make the job easier. The two popular python http client libs I see are cover all/most features are:
* httplib2 (big bonus in that it runs on python 2.4)
* requests (doesn't support python 2.4)
I'm tempted to use httplib2 for this since it'll be sticking with python but also support python 2.4. But before I start working on this though I'd like to get feedback from others to see if I might be missing something glaringly obvious. While I realize this likely won't be support in core due to external deps (?) I'd like to make this module useful to others as well.
Thanks!
--
Romeo