hyperledger_labs.fabric_ansible_collection.external_ordering_service_node (2.0.0) — module

Manage an external Hyperledger Fabric ordering service node

Authors: Simon Stone (@sstone1)

preview | supported by community

Install collection

Install with ansible-galaxy collection install hyperledger_labs.fabric_ansible_collection:==2.0.0


Add to requirements.yml

  collections:
    - name: hyperledger_labs.fabric_ansible_collection
      version: 2.0.0

Description

Import or remove an external Hyperledger Fabric ordering service node.

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: Import the ordering service node
  hyperledger.fabric_ansible_collection.external_ordering_service_node:
    state: present
    api_endpoint: https://console.example.org:32000
    api_authtype: basic
    api_key: xxxxxxxx
    api_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    ordering_service_node: "{{ lookup('file', 'Ordering Service Node.json') }}"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove the imported ordering service node
  hyperledger.fabric_ansible_collection.external_ordering_service_node:
    state: absent
    api_endpoint: https://console.example.org:32000
    api_authtype: basic
    api_key: xxxxxxxx
    api_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    name: Ordering Service Node

Inputs

    
name:
    description:
    - The name of the external ordering service node.
    - Only required when I(state) is C(absent).
    type: str

state:
    choices:
    - absent
    - present
    default: present
    description:
    - C(absent) - An ordering service matching the specified name will be stopped and
      removed.
    - C(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: str

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

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_node:
    description:
    - The definition of the external ordering service node.
    - Only required when I(state) is C(present).
    suboptions:
      api_url:
        description:
        - The URL for the API of the ordering service node.
        type: str
      client_tls_cert:
        description:
        - The client TLS certificate for the ordering service node.
        type: str
      cluster_id:
        description:
        - The unique ID of the ordering service cluster.
        type: str
      cluster_name:
        description:
        - The name of the ordering service cluster.
        type: str
      grpcwp_url:
        description:
        - The URL for the gRPC web proxy of the ordering service node.
        type: str
      location:
        description:
        - The location of the ordering service node.
        type: str
      msp_id:
        description:
        - The MSP ID of the ordering service node.
        type: str
      name:
        description:
        - The name of the ordering service node.
        type: str
      operations_url:
        description:
        - The URL for the operations service of the ordering service node.
        type: str
      pem:
        description:
        - The TLS certificate chain for the ordering service node.
        type: str
      server_tls_cert:
        description:
        - The client TLS certificate for the ordering service node.
        type: str
      system_channel_id:
        description:
        - The name of the system channel for the ordering service node.
        type: str
      tls_ca_root_cert:
        description:
        - The TLS certificate chain for the ordering service node.
        type: str
      tls_cert:
        description:
        - The TLS certificate for the ordering service node.
        type: str
    type: dict

Outputs

ordering_service_node:
  contains:
    api_url:
      description:
      - The URL for the API of the ordering service node.
      sample: grpcs://orderingservice1-api.example.org:32000
      type: str
    client_tls_cert:
      description:
      - The client TLS certificate for the ordering service node.
      - The client TLS certificate is returned as a base64 encoded PEM.
      sample: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t...
      type: str
    cluster_id:
      description:
      - The unique ID of the ordering service cluster.
      sample: abcdefgh
      type: str
    cluster_name:
      description:
      - The name of the ordering service cluster.
      sample: Ordering Service
      type: str
    grpcwp_url:
      description:
      - The URL for the gRPC web proxy of the ordering service node.
      sample: https://orderingservice1-grpcwebproxy.example.org:32000
      type: str
    location:
      description:
      - The location of the ordering service node.
      sample: ibmcloud
      type: str
    msp_id:
      description:
      - The MSP ID of the ordering service node.
      sample: OrdererOrgMSP
      type: str
    name:
      description:
      - The name of the ordering service node.
      sample: Ordering Service_1
      type: str
    operations_url:
      description:
      - The URL for the operations service of the ordering service node.
      sample: https://orderingservice1-operations.example.org:32000
      type: str
    pem:
      description:
      - The TLS certificate chain for the ordering service node.
      - The TLS certificate chain is returned as a base64 encoded PEM.
      sample: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t...
      type: str
    server_tls_cert:
      description:
      - The server TLS certificate for the ordering service node.
      - The server TLS certificate is returned as a base64 encoded PEM.
      sample: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t...
      type: str
    system_channel_id:
      description:
      - The name of the system channel for the ordering service node.
      sample: testchainid
      type: str
    tls_ca_root_cert:
      description:
      - The TLS certificate chain for the ordering service node.
      - The TLS certificate chain is returned as a base64 encoded PEM.
      sample: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t...
      type: str
    tls_cert:
      description:
      - The TLS certificate for the ordering service node.
      - The TLS certificate is returned as a base64 encoded PEM.
      sample: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t...
      type: str
  description:
  - The ordering service node.
  returned: when I(state) is C(present)
  type: dict