hyperledger / hyperledger.fabric_ansible_collection / 2.0.7 / module / channel_block Fetch blocks for a Hyperledger Fabric channel Authors: Simon Stone (@sstone1) preview | supported by communityhyperledger.fabric_ansible_collection.channel_block (2.0.7) — module
Install with ansible-galaxy collection install hyperledger.fabric_ansible_collection:==2.0.7
collections: - name: hyperledger.fabric_ansible_collection version: 2.0.7
Fetch blocks for a Hyperledger Fabric channel.
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.
- name: Fetch the genesis block for the channel hyperledger.fabric_ansible_collection.channel_block: state: present api_endpoint: https://console.example.org:32000 api_authtype: basic api_key: xxxxxxxx api_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ordering_service: Ordering Service identity: Org1 Admin.json msp_id: Org1MSP name: mychannel target: "0" path: channel_genesis_block.bin
hsm: description: - 'The PKCS #11 compliant HSM configuration to use for digital signatures.' - Only required if the identity specified in I(identity) was enrolled using an HSM. suboptions: label: description: - The HSM label that should be used for digital signatures. type: str pin: description: - The HSM pin that should be used for digital signatures. type: str pkcs11library: description: - 'The PKCS #11 library that should be used for digital signatures.' type: str type: dict name: description: - The name of the channel. required: true type: str path: description: - The path to the file where the channel configuration or the channel configuration update transaction will be stored. required: true type: str state: choices: - absent - present default: present description: - C(absent) - If a block exists at the specified I(path), it will be removed. - C(present) - Fetch the block from the specified channel and store it at the specified I(path). type: str msp_id: description: - The MSP ID to use for interacting with the ordering service or for signing channel configuration update transactions. required: true type: str target: description: - The target block to fetch. - Can be the number of the block to fetch, or one of C(newest), C(oldest) or C(config). required: true type: str api_key: description: - The API key for the Fabric operations console. required: true type: str identity: description: - The identity to use when interacting with the ordering service or for signing channel configuration update transactions. - You can pass a string, which is the path to the JSON file where the enrolled identity is stored. - You can also pass a dict, which must match the result format of one of the M(enrolled_identity_info) or M(enrolled_identity) modules. required: true type: raw api_secret: description: - The API secret for the Fabric operations console. - Only required when I(api_authtype) is C(basic). type: str api_timeout: default: 60 description: - The timeout, in seconds, to use when interacting with the Fabric operations console. type: int api_authtype: description: - C(basic) - Authenticate to the Fabric operations console using basic authentication. You must provide both a valid API key using I(api_key) and API secret using I(api_secret). required: true type: str api_endpoint: description: - The URL for the Fabric operations console. required: true type: str ordering_service: description: - The ordering service to use to manage the channel. - You can pass a string, which is the cluster name of a ordering service registered with the Fabric operations console. - You can also pass a list, which must match the result format of one of the M(ordering_service_info) or M(ordering_service) modules. - Only required when I(operation) is C(fetch). - Cannot be specified with I(ordering_service_nodes). required: true type: raw ordering_service_nodes: description: - The ordering service nodes to use to manage the channel. - You can pass strings, which are the names of ordering service nodes that are registered with the Fabric operations console. - You can also pass a dict, which must match the result format of one of the M(ordering_service_node_info) or M(ordering_service_node) modules. - Only required when I(operation) is C(fetch). - Cannot be specified with I(ordering_service). type: raw tls_handshake_time_shift: description: - The amount of time to shift backwards for certificate expiration checks during TLS handshakes with the ordering service endpoint. - Only use this option if the ordering service TLS certificates have expired. - The value must be a duration, for example I(30m), I(24h), or I(6h30m). type: str
path: description: - The path to the file where the channel block is stored. returned: always type: str