mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-08 01:14:03 -07:00
Initial commit of Ansible support for the Consul clustering framework (http://consul.io).
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
This commit is contained in:
parent
53a3644ecd
commit
c02f114967
12 changed files with 1121 additions and 1 deletions
11
test/integration/consul_running.py
Normal file
11
test/integration/consul_running.py
Normal file
|
@ -0,0 +1,11 @@
|
|||
''' Checks that the consul agent is running locally. '''
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
try:
|
||||
import consul
|
||||
consul = consul.Consul(host='0.0.0.0', port=8500)
|
||||
consul.catalog.nodes()
|
||||
print "True"
|
||||
except:
|
||||
pass
|
Loading…
Add table
Add a link
Reference in a new issue