hyperledger.fabric_ansible_collection.consortium_member (2.0.7) — module

Manage a consortium member for a Hyperledger Fabric ordering service

Authors: Simon Stone (@sstone1)

preview | supported by community

Install collection

Install with ansible-galaxy collection install hyperledger.fabric_ansible_collection:==2.0.7


Add to requirements.yml

  collections:
    - name: hyperledger.fabric_ansible_collection
      version: 2.0.7

Description

Add, update, and remove consortium members for a 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.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add the organization to the consortium
  hyperledger.fabric_ansible_collection.consortium_member:
    state: present
    api_endpoint: https://console.example.org:32000
    api_authtype: basic
    api_key: xxxxxxxx
    api_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    organization: Org1
    path: channel_config.bin
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove the organization from the consortium
  hyperledger.fabric_ansible_collectionble-collectionble-collectionble-collection.consortium_member:
    state: absent
    api_endpoint: https://console.example.org:32000
    api_authtype: basic
    api_key: xxxxxxxx
    api_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    organization: Org1
    path: channel_config.bin

Inputs

    
path:
    description:
    - Path to current the system channel configuration file.
    - This file can be fetched by using the M(channel_config) module.
    - This file will be updated in place. You will need to keep a copy of the original
      file for computing the configuration update.
    required: true
    type: str

state:
    choices:
    - absent
    - present
    default: present
    description:
    - C(absent) - An organization matching the specified name will be removed from the
      consortium.
    - C(present) - Asserts that an organization matching the specified name and configuration
      exists in the consortium. If no organization matches the specified name, the organization
      will be added to the consortium. If an organization matches the specified name but
      the configuration does not match, then the organization in the consortium will be
      updated.
    type: str

api_key:
    description:
    - The API key for the Fabric operations console.
    required: true
    type: str

policies:
    description:
    - The set of policies for the consortium member. The keys are the policy names, and
      the values are the policies.
    - You can pass strings, which are paths to JSON files containing policies in the Hyperledger
      Fabric format (common.Policy).
    - You can also pass a dict, which must correspond to a parsed policy in the Hyperledger
      Fabric format (common.Policy).
    - Default policies are provided for the Admins, Writers, Readers, and Endorsement
      policies. You only need to provide policies if you want to override these default
      policies, or add additional policies.
    type: dict

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

organization:
    description:
    - The organization to add, update, or remove from the consortium.
    - You can pass a string, which is the display name of an organization registered with
      the Fabric operations console.
    - You can also pass a dictionary, which must match the result format of one of the
      M(organization_info) or M(organization[]) modules.
    required: true
    type: raw