#
# SPDX-License-Identifier: Apache-2.0
#
---
- name: Import the ordering service
  hosts: localhost
  vars_files:
    - /_cfg/fabric-common-vars.yml
    - /_cfg/fabric-org2-vars.yml
  tasks:
    - name: Import the ordering service
      ibm.blockchain_platform.external_ordering_service:
        api_endpoint: "{{ api_endpoint }}"
        api_authtype: "{{ api_authtype }}"
        api_key: "{{ api_key }}"
        api_secret: "{{ api_secret | default(omit) }}"
        api_token_endpoint: "{{ api_token_endpoint | default(omit) }}"
        ordering_service: "{{ lookup('file', ordering_service_name+'.json') }}"
