Skip to content

Latest commit

 

History

History
224 lines (191 loc) · 7.36 KB

community.missing_collection.consul_status_module.rst

File metadata and controls

224 lines (191 loc) · 7.36 KB

community.missing_collection.consul_status

Get information from Consul (Status).

Version added: 0.4.0

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

  • requests
Parameter Choices/Defaults Comments
dc
string
Default:
""
datacenter for consul.
get_leader
boolean
    Choices:
  • no
  • yes
get information about current leader.
get_peers
boolean
    Choices:
  • no
  • yes
get information about all the peers.
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 leader information
  consul_status:
    get_leader: true

- name: get current perrs information
  consul_status:
    get_peers: true

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

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

Sample:
10.1.10.12:8300


Authors