external_ordering_service – Manage an external Hyperledger Fabric ordering service
Synopsis
Import or remove an external Hyperledger Fabric ordering service.
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: intDefault value:60- state
absent- An ordering service matching the specified name will be stopped and removed.
present- Asserts that an ordering service matching the specified name and configuration exists. If no ordering service matches the specified name, an ordering service will be created. If an ordering service matches the specified name but the configuration does not match, then the ordering service will be updated, if it can be. If it cannot be updated, it will be removed and re-created with the specified configuration.Type: strDefault value:present- name
The name of the external ordering service.
Only required when state is
absent.Type: str- ordering_service
The definition of the external ordering service, as a list of ordering service nodes.
Only required when state is
present.Type: listElements: dict
- name
The name of the ordering service node.
Type: str- api_url
The URL for the API of the ordering service node.
Type: str- operations_url
The URL for the operations service of the ordering service node.
Type: str- grpcwp_url
The URL for the gRPC web proxy of the ordering service node.
Type: str- msp_id
The MSP ID of the ordering service node.
Type: str- pem
The TLS certificate chain for the ordering service node.
Type: str- tls_ca_root_cert
The TLS certificate chain for the ordering service node.
Type: str- tls_cert
The TLS certificate for the ordering service node.
Type: str- location
The location of the ordering service node.
Type: str- system_channel_id
The name of the system channel for the ordering service node.
Type: str- client_tls_cert
The client TLS certificate for the ordering service node.
Type: str- server_tls_cert
The client TLS certificate for the ordering service node.
Type: str- cluster_id
The unique ID of the ordering service cluster.
Type: str- cluster_name
The name of the ordering service cluster.
Type: str
Examples
- name: Import the ordering service
hyperledger.fabric_ansible_collection.external_ordering_service:
state: present
api_endpoint: https://console.example.org:32000
api_authtype: basic
api_key: xxxxxxxx
api_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ordering_service: "{{ lookup('file', 'Ordering Service.json') }}"
- name: Remove the imported ordering service
hyperledger.fabric_ansible_collection.external_ordering_service:
state: absent
api_endpoint: https://console.example.org:32000
api_authtype: basic
api_key: xxxxxxxx
api_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
name: Ordering Service
Return Values
- ordering_service
The ordering service, as a list of ordering service nodes.
Returned: when state ispresentType: listElements: dict
- name
The name of the ordering service node.
Type: strSample:Ordering Service_1- api_url
The URL for the API of the ordering service node.
Type: strSample:grpcs://orderingservice1-api.example.org:32000- operations_url
The URL for the operations service of the ordering service node.
Type: strSample:https://orderingservice1-operations.example.org:32000- grpcwp_url
The URL for the gRPC web proxy of the ordering service node.
Type: strSample:https://orderingservice1-grpcwebproxy.example.org:32000- msp_id
The MSP ID of the ordering service node.
Type: strSample:OrdererOrgMSP- pem
The TLS certificate chain for the ordering service node.
The TLS certificate chain is returned as a base64 encoded PEM.
Type: strSample:LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t...- tls_ca_root_cert
The TLS certificate chain for the ordering service node.
The TLS certificate chain is returned as a base64 encoded PEM.
Type: strSample:LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t...- tls_cert
The TLS certificate for the ordering service node.
The TLS certificate is returned as a base64 encoded PEM.
Type: strSample:LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t...- location
The location of the ordering service node.
Type: strSample:ibmcloud- system_channel_id
The name of the system channel for the ordering service node.
Type: strSample:testchainid- client_tls_cert
The client TLS certificate for the ordering service node.
The client TLS certificate is returned as a base64 encoded PEM.
Type: strSample:LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t...- server_tls_cert
The server TLS certificate for the ordering service node.
The server TLS certificate is returned as a base64 encoded PEM.
Type: strSample:LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t...- cluster_id
The unique ID of the ordering service cluster.
Type: strSample:abcdefgh- cluster_name
The name of the ordering service cluster.
Type: strSample:Ordering Service