Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Stone authored May 18, 2020
2 parents 19dca66 + de85897 commit 6b3b3d1
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 24 deletions.
42 changes: 30 additions & 12 deletions roles/endorsing_organization/tasks/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@
hf.GenCRL: true
hf.Registrar.Attributes: "*"
hf.AffiliationMgr: true
- name: "{{ organization_admin_enrollment_id }}"
pass: "{{ organization_admin_enrollment_secret }}"
type: admin
maxenrollments: -1
- name: "{{ peer_enrollment_id }}"
pass: "{{ peer_enrollment_secret }}"
type: peer
maxenrollments: -1
tlsca:
registry:
maxenrollments: -1
Expand All @@ -52,10 +44,6 @@
hf.GenCRL: true
hf.Registrar.Attributes: "*"
hf.AffiliationMgr: true
- name: "{{ peer_enrollment_id }}"
pass: "{{ peer_enrollment_secret }}"
type: peer
maxenrollments: -1
resources: "{{ ca_resources | default(omit) }}"
storage: "{{ ca_storage | default(omit) }}"
wait_timeout: "{{ wait_timeout | default(omit) }}"
Expand All @@ -74,6 +62,36 @@
enrollment_secret: "{{ ca_admin_enrollment_secret }}"
path: "{{ playbook_dir }}/{{ ca_name }} Admin.json"

- name: Register the organization admin
ibm.blockchain_platform.registered_identity:
state: "{{ state }}"
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) }}"
certificate_authority: "{{ ca_name }}"
registrar: "{{ playbook_dir }}/{{ ca_name }} Admin.json"
enrollment_id: "{{ organization_admin_enrollment_id }}"
enrollment_secret: "{{ organization_admin_enrollment_secret }}"
max_enrollments: -1
type: admin

- name: Register the peer
ibm.blockchain_platform.registered_identity:
state: "{{ state }}"
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) }}"
certificate_authority: "{{ ca_name }}"
registrar: "{{ playbook_dir }}/{{ ca_name }} Admin.json"
enrollment_id: "{{ peer_enrollment_id }}"
enrollment_secret: "{{ peer_enrollment_secret }}"
max_enrollments: -1
type: peer

- name: Enroll the organization admin
ibm.blockchain_platform.enrolled_identity:
state: "{{ state }}"
Expand Down
42 changes: 30 additions & 12 deletions roles/ordering_organization/tasks/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@
hf.GenCRL: true
hf.Registrar.Attributes: "*"
hf.AffiliationMgr: true
- name: "{{ organization_admin_enrollment_id }}"
pass: "{{ organization_admin_enrollment_secret }}"
type: admin
maxenrollments: -1
- name: "{{ ordering_service_enrollment_id }}"
pass: "{{ ordering_service_enrollment_secret }}"
type: orderer
maxenrollments: -1
tlsca:
registry:
maxenrollments: -1
Expand All @@ -52,10 +44,6 @@
hf.GenCRL: true
hf.Registrar.Attributes: "*"
hf.AffiliationMgr: true
- name: "{{ ordering_service_enrollment_id }}"
pass: "{{ ordering_service_enrollment_secret }}"
type: orderer
maxenrollments: -1
resources: "{{ ca_resources | default(omit) }}"
storage: "{{ ca_storage | default(omit) }}"
wait_timeout: "{{ wait_timeout | default(omit) }}"
Expand All @@ -74,6 +62,36 @@
enrollment_secret: "{{ ca_admin_enrollment_secret }}"
path: "{{ playbook_dir }}/{{ ca_name }} Admin.json"

- name: Register the organization admin
ibm.blockchain_platform.registered_identity:
state: "{{ state }}"
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) }}"
certificate_authority: "{{ ca_name }}"
registrar: "{{ playbook_dir }}/{{ ca_name }} Admin.json"
enrollment_id: "{{ organization_admin_enrollment_id }}"
enrollment_secret: "{{ organization_admin_enrollment_secret }}"
max_enrollments: -1
type: admin

- name: Register the ordering service
ibm.blockchain_platform.registered_identity:
state: "{{ state }}"
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) }}"
certificate_authority: "{{ ca_name }}"
registrar: "{{ playbook_dir }}/{{ ca_name }} Admin.json"
enrollment_id: "{{ ordering_service_enrollment_id }}"
enrollment_secret: "{{ ordering_service_enrollment_secret }}"
max_enrollments: -1
type: orderer

- name: Enroll the organization admin
ibm.blockchain_platform.enrolled_identity:
state: "{{ state }}"
Expand Down

0 comments on commit 6b3b3d1

Please sign in to comment.