ansible/test/legacy/consul_running.py

12 lines
263 B
Python
Raw Normal View History

''' 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()
2015-08-27 19:02:35 +00:00
print("True")
except Exception:
pass