peer_info – Get information about a Hyperledger Fabric peer

Synopsis

Get information about a Hyperledger Fabric peer.

This module works with the IBM Support for Hyperledger Fabric software or the Hyperledger Fabric Open Source Stack running in a Red Hat OpenShift or Kubernetes cluster.

Parameters

api_endpoint (required)

The URL for the Fabric operations console.

Type: str
api_authtype (required)

basic - Authenticate to the Fabric operations console using basic authentication. You must provide both a valid API key using api_key and API secret using api_secret.

Type: str
api_key (required)

The API key for the Fabric operations console.

Type: str
api_secret

The API secret for the Fabric operations console.

Only required when api_authtype is basic.

Type: str
api_timeout

The timeout, in seconds, to use when interacting with the Fabric operations console.

Type: int
Default value: 60
name (required)

The name of the peer.

wait_timeout

The timeout, in seconds, to wait until the peer is available.

Type: int
Default value: 60

Examples

- name: Get peer
  hyperledger.fabric_ansible_collection.peer_info:
    api_endpoint: https://console.example.org:32000
    api_authtype: basic
    api_key: xxxxxxxx
    api_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    name: Org1 Peer

Return Values

exists

True if the peer exists, false otherwise.

Type: boolean
peer

The peer.

Returned: if peer exists
Type: dict
name

The name of the peer.

Type: str
Sample: Org1 Peer
api_url

The URL for the API of the peer.

Type: str
Sample: grpcs://org1peer-api.example.org:32000
operations_url

The URL for the operations service of the peer.

Type: str
Sample: grpcs://org1peer-operations.example.org:32000
grpcwp_url

The URL for the gRPC web proxy of the peer.

Type: str
Sample: grpcs://org1peer-grpcwebproxy.example.org:32000
msp_id

The MSP ID of the peer.

Type: str
Sample: Org1MSP
pem

The TLS certificate chain for the peer.

The TLS certificate chain is returned as a base64 encoded PEM.

Type: str
Sample: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t...
tls_ca_root_cert

The TLS certificate chain for the peer.

The TLS certificate chain is returned as a base64 encoded PEM.

Type: str
Sample: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t...
tls_cert

The TLS certificate for the peer.

The TLS certificate is returned as a base64 encoded PEM.

Type: str
Sample: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t...
location

The location of the peer.

Type: str
Sample: ibmcloud