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
Submission includes support for
- creating and registering services and checks
- reading, writing and lookup for values in consul's kv store
- creating and manipulating sessions for distributed locking on values in the kv
- creating and manipulating ACLs for restricting access to the kv store
- inventory support that reads the Consul catalog and group nodes according to
- datacenters
- exposed services
- service availability
- arbitrary groupings from the kv store
This submission makes extensive use of the python-consul library and this is required
as a dependency and can be installed from pip.
The tests were written to target a vagrant cluster which can be setup by following the
instructions here http://github.com/sgargan/consul-vagrant