/
17-join-peer-to-channel.yml
37 lines (36 loc) · 1.24 KB
/
17-join-peer-to-channel.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#
# SPDX-License-Identifier: Apache-2.0
#
---
- name: Join the channel
hosts: localhost
vars_files:
- common-vars.yml
- org2-vars.yml
tasks:
- name: Fetch the genesis block for the channel
ibm.blockchain_platform.channel_block:
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) }}"
operation: fetch
ordering_service: "{{ ordering_service_name }}"
identity: "{{ org2_name }} Admin.json"
msp_id: "{{ org2_msp_id }}"
name: "{{ channel_name }}"
target: "0"
path: channel_genesis_block.bin
- name: Join the peer to the channel
ibm.blockchain_platform.peer_channel:
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) }}"
operation: join
peer: "{{ org2_peer_name }}"
identity: "{{ org2_name }} Admin.json"
msp_id: "{{ org2_msp_id }}"
path: channel_genesis_block.bin