Skip to content

Latest commit

 

History

History
164 lines (132 loc) · 5.83 KB

community.missing_collection.consul_members_module.rst

File metadata and controls

164 lines (132 loc) · 5.83 KB

community.missing_collection.consul_members

Get information from Consul (Members).

Version added: 0.4.0

  • Get information from Consul (Members).

The below requirements are needed on the host that executes this module.

  • requests
Parameter Choices/Defaults Comments
host
string
Default:
"localhost"
hostname/ip of consul.
port
string
Default:
"8500"
port number of consul.
scheme
string
    Choices:
  • http ←
  • https
http scheme for consul.
token
string
auth token for consul.

- name: get current memebers list
  consul_members:

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
result
list
when success.
result from the consul api.

Sample:
[{'Name': 'server-1', 'Addr': '172.17.0.2', 'Port': 8301, 'Tags': {'acls': '0', 'bootstrap': '1', 'build': '1.10.3:c976ffd2', 'dc': 'dc1', 'ft_fs': '1', 'ft_si': '1', 'id': '61f18701-87ca-2e73-891d-16424997022a', 'port': '8300', 'raft_vsn': '3', 'role': 'consul', 'segment': '', 'vsn': '2', 'vsn_max': '3', 'vsn_min': '2', 'wan_join_port': '8302'}, 'Status': 1, 'ProtocolMin': 1, 'ProtocolMax': 5, 'ProtocolCur': 2, 'DelegateMin': 2, 'DelegateMax': 5, 'DelegateCur': 4}]


Authors