channel_consenter – Manage a consenter for a Hyperledger Fabric channel
Synopsis
Specify a consenter for a Hyperledger Fabric channel by using the IBM Blockchain Platform.
This module works with the IBM Blockchain Platform managed service running in IBM Cloud, or the IBM Blockchain Platform software running in a Red Hat OpenShift or Kubernetes cluster.
Parameters
- api_endpoint (required)
The URL for the IBM Blockchain Platform console.
Type: str- api_authtype (required)
ibmcloud
- Authenticate to the IBM Blockchain Platform console using IBM Cloud authentication. You must provide a valid API key using api_key.
basic
- Authenticate to the IBM Blockchain Platform 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 IBM Blockchain Platform console.
Type: str- api_secret
The API secret for the IBM Blockchain Platform console.
Only required when api_authtype is
basic
.Type: str- api_timeout
The timeout, in seconds, to use when interacting with the IBM Blockchain Platform console.
Type: intDefault value:60
- api_token_endpoint
The IBM Cloud IAM token endpoint to use when using IBM Cloud authentication.
Only required when api_authtype is
ibmcloud
, and you are using IBM internal staging servers for testing.Type: strDefault value:https://iam.cloud.ibm.com/identity/token
- state
absent
- A consenter matching the specified name will be removed from the channel.
present
- Asserts that an consenter matching the specified name and configuration exists in the channel. If no consenter matches the specified name, the consenter will be added to the channel. If an consenter matches the specified name but the configuration does not match, then the consenter in the channel will be updated.Type: strDefault value:present
- path (required)
Path to current the channel configuration file.
This file can be fetched by using the ERROR while parsing: While parsing “M(channel_config)” at index 39: Module name “channel_config” is not a FQCN module.
This file will be updated in place. You will need to keep a copy of the original file for computing the configuration update.
Type: str- ordering_service_node
The ordering service node to use as a consenter for this channel.
You can pass a string, which is the name of an ordering service node that is registered with the IBM Blockchain Platform console.
You can also pass a dict, which must match the result format of one of the ERROR while parsing: While parsing “M(ordering_service_node_info)” at index 76: Module name “ordering_service_node_info” is not a FQCN or ERROR while parsing: While parsing “M(ordering_service_node)” at index 109: Module name “ordering_service_node” is not a FQCN modules.
Type: raw
Examples
- name: Add consenter to channel
ibm.blockchain_platform.channel_consenters:
state: present
api_endpoint: https://ibp-console.example.org:32000
api_authtype: basic
api_key: xxxxxxxx
api_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
path: channel_config.bin
ordering_service_node: Ordering Service_1
- name: Remove consenter from channel
ibm.blockchain_platform.channel_consenters:
state: absent
api_endpoint: https://ibp-console.example.org:32000
api_authtype: basic
api_key: xxxxxxxx
api_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
path: channel_config.bin
ordering_service_node: Ordering Service_1