Skip to content

Latest commit

 

History

History
302 lines (268 loc) · 11 KB

community.missing_collection.etcd3_info_module.rst

File metadata and controls

302 lines (268 loc) · 11 KB

community.missing_collection.etcd3_info

Get Information from ETCD Cluster.

Version added: 0.4.0

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

  • etcd3
Parameter Choices/Defaults Comments
get_lease_status
boolean
    Choices:
  • no
  • yes
get lease status for given id.
get_status
boolean
    Choices:
  • no
  • yes
get status from connected node.
get_value
boolean
    Choices:
  • no
  • yes
get value of given key.
host
string
Default:
"localhost"
host/ip of etcd node.
id
integer
lease id
key
string
key to lookup in etcd database
password
string
Default:
"None"
password for etcd node if authentication is enabled.
port
integer / required
Default:
2379
port number for etcd node.
user
string
Default:
"None"
username for etcd node if authentication is enabled.

- name: get value of key
  community.missing_collection.etcd3_info:
    host: "localhost"
    port: 2379
    get_value: true
    key: '/Test'

- name: get status of current etcd node
  community.missing_collection.etcd3_info:
    host: "localhost"
    port: 2379
    get_status: true

- name: get lease status of given id
  community.missing_collection.etcd3_info:
    host: "localhost"
    port: 2379
    get_lease_status: true
    id: "7587857742833949726"

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

Key Returned Description
lease_status
dictionary
when get_lease_status and success.
get status of given lease id

Sample:
{'granted_ttl': 1000, 'keys': ['/Test4'], 'ttl': 655}
status
dictionary
when get_status and success.
get status from etcd node

Sample:
{'db_size': 20480, 'leader': {'id': 10276657743932975437, 'name': 'default'}, 'raft_index': 11, 'version': '3.5.0'}
value
string
when get_value and success.
get value of given key

Sample:
bar


Authors