* Fix Kubernetes API auth regression from 393e43b8
Commit 393e43b8 renames url_username and url_password to username and
password, which breaks authentication to a Kubernetes API endpoint as
fetch_url() in ansible.module_utils.urls relies on url_username and
url_password being set.
* Add aliases for clustering/kubernetes.py
- username as alias for url_username
- password as alias for url_password
PR #1299 introduced the service_address parameter but specified a
default value of localhost. This is a breaking change; prior to that,
the consul module would always assume that the service should advertise
the address that the Consul agent was listening on. With this change,
the consul module will now default to advertising localhost to all nodes
for the service, which isn't the desired behavior. This changes the
default back to None which is the implicit default prior to #1299.
1) Removed kubectl functionality. We'll move that into a different
module in the future. Also removed post/put/patch/delete options,
as they are not Ansible best practice.
2) Expanded error handling in areas where tracebacks were most likely,
based on bad data from users, etc.
3) Added an 'insecure' option and made the password param optional, to
enable the use of the local insecure port.
4) Allowed the data (both inline and from the file) to support multiple
items via a list. This is common in YAML files where mutliple docs
are used to create/remove multiple resources in one shot.
5) General bug fixing.
Session_id is unused in update_session, changed is always specifically
set in all exit_json call, and consul_client.session.destroy return True
or False, and is unused later (nor checked)
Some do not use the json module directly so don't need import json.
Some needed to fallback to simplejson with no traceback if neither was installed
Fixes#1298