Skip to content
This repository was archived by the owner on Jan 20, 2021. It is now read-only.

Commit 4bed693

Browse files
author
Simon Stone
authored
Merge pull request #91 from sstone1/issue-90
Quote all path references in commands (resolves #90)
2 parents 0581512 + c74920d commit 4bed693

13 files changed

+31
-31
lines changed

tasks/docker/create-orderer.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
- name: Compare the orderer user enrollment with orderer container
127127
shell: >
128128
set -o pipefail &&
129-
tar cf - -C {{ organization.wallet }}/{{ orderer.identity }} . |
129+
tar cf - -C "{{ organization.wallet }}/{{ orderer.identity }}" . |
130130
docker exec -i {{ orderer.docker.name }} sh -c "
131131
cat >/tmp/msp.tar &&
132132
rm -rf /tmp/msp &&
@@ -145,14 +145,14 @@
145145
- name: Copy the orderer user enrollment into orderer container
146146
command: >
147147
docker cp
148-
{{ organization.wallet }}/{{ orderer.identity }}/.
148+
"{{ organization.wallet }}/{{ orderer.identity }}/."
149149
{{ orderer.docker.name }}:/etc/hyperledger/fabric/msp/
150150
when: check_orderer_msp.rc != 0
151151

152152
- name: Compare the orderer TLS user enrollment with orderer container
153153
shell: >
154154
set -o pipefail &&
155-
tar cf - -C {{ organization.wallet }}/{{ orderer.tls.identity }} . |
155+
tar cf - -C "{{ organization.wallet }}/{{ orderer.tls.identity }}" . |
156156
docker exec -i {{ orderer.docker.name }} sh -c "
157157
cat >/tmp/tls.tar &&
158158
rm -rf /tmp/tls &&
@@ -172,7 +172,7 @@
172172
- name: Copy the orderer TLS user enrollment into orderer container
173173
command: >
174174
docker cp
175-
{{ organization.wallet }}/{{ orderer.tls.identity }}/.
175+
"{{ organization.wallet }}/{{ orderer.tls.identity }}/."
176176
{{ orderer.docker.name }}:/etc/hyperledger/fabric/tls/
177177
when: orderer.tls.enabled and check_orderer_tls.rc != 0
178178

tasks/docker/create-peer.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
- name: Compare the peer user enrollment with peer container
167167
shell: >
168168
set -o pipefail &&
169-
tar cf - -C {{ organization.wallet }}/{{ peer.identity }} . |
169+
tar cf - -C "{{ organization.wallet }}/{{ peer.identity }}" . |
170170
docker exec -i {{ peer.docker.name }} sh -c "
171171
cat >/tmp/msp.tar &&
172172
rm -rf /tmp/msp &&
@@ -185,14 +185,14 @@
185185
- name: Copy the peer user enrollment into peer container
186186
command: >
187187
docker cp
188-
{{ organization.wallet }}/{{ peer.identity }}/.
188+
"{{ organization.wallet }}/{{ peer.identity }}/."
189189
{{ peer.docker.name }}:/etc/hyperledger/fabric/msp/
190190
when: check_peer_msp.rc != 0
191191

192192
- name: Compare the peer TLS user enrollment with peer container
193193
shell: >
194194
set -o pipefail &&
195-
tar cf - -C {{ organization.wallet }}/{{ peer.tls.identity }} . |
195+
tar cf - -C "{{ organization.wallet }}/{{ peer.tls.identity }}" . |
196196
docker exec -i {{ peer.docker.name }} sh -c "
197197
cat >/tmp/tls.tar &&
198198
rm -rf /tmp/tls &&
@@ -212,7 +212,7 @@
212212
- name: Copy the peer TLS user enrollment into peer container
213213
command: >
214214
docker cp
215-
{{ organization.wallet }}/{{ peer.tls.identity }}/.
215+
"{{ organization.wallet }}/{{ peer.tls.identity }}/."
216216
{{ peer.docker.name }}:/etc/hyperledger/fabric/tls/
217217
when: peer.tls.enabled and check_peer_tls.rc != 0
218218

tasks/enroll-tls-user.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
--csr.hosts {{ hostnames }}
2727
-u {{ protocol }}://{{ identity }}:{{ secret }}@{{ hostname }}:{{ port }}
2828
--caname {{ caname }}
29-
-M {{ identity_directory }}-temp
30-
{% if protocol == "https" %}--tls.certfiles {{ organization.wallet }}/ca-tls-root.pem{% endif %}
29+
-M "{{ identity_directory }}-temp"
30+
{% if protocol == "https" %}--tls.certfiles "{{ organization.wallet }}/ca-tls-root.pem"{% endif %}
3131
when: not identity_directory_stats.stat.exists
3232

3333
- name: Create the TLS directory

tasks/enroll-user.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
fabric-ca-client enroll
2424
-u {{ protocol }}://{{ identity }}:{{ secret }}@{{ hostname }}:{{ port }}
2525
--caname {{ caname }}
26-
-M {{ identity_directory }}
27-
{% if protocol == "https" %}--tls.certfiles {{ organization.wallet }}/ca-tls-root.pem{% endif %}
26+
-M "{{ identity_directory }}"
27+
{% if protocol == "https" %}--tls.certfiles "{{ organization.wallet }}/ca-tls-root.pem"{% endif %}
2828
when: not identity_directory_stats.stat.exists
2929

3030
- name: Load user certificate

tasks/manage-channel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
-o {{ ibp[channel.orderer.id].hostname }}:{{ ibp[channel.orderer.id].port }}
1111
-c {{ channel.name }}
1212
{{ '--tls' if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
13-
{{ '--cafile ' + ibp[channel.orderer.id].pem if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
13+
{{ '--cafile "' + ibp[channel.orderer.id].pem + '"' if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
1414
{{ '--ordererTLSHostnameOverride ' + ibp[channel.orderer.id].internal_hostname if ibp[channel.orderer.id].internal_hostname is defined else '' }}
1515
environment:
1616
CORE_PEER_MSPCONFIGPATH: "{{ channel.members[0].wallet }}/{{ channel.members[0].msp.admin.identity }}"

tasks/manage-channel/create-channel.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
-o {{ ibp[channel.orderer.id].hostname }}:{{ ibp[channel.orderer.id].port }}
3838
-c {{ channel.name }}
3939
{{ '--tls' if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
40-
{{ '--cafile ' + ibp[channel.orderer.id].pem if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
40+
{{ '--cafile "' + ibp[channel.orderer.id].pem + '"' if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
4141
{{ '--ordererTLSHostnameOverride ' + ibp[channel.orderer.id].internal_hostname if ibp[channel.orderer.id].internal_hostname is defined else '' }}
4242
environment:
4343
CORE_PEER_MSPCONFIGPATH: "{{ channel.members[0].wallet }}/{{ channel.members[0].msp.admin.identity }}"
@@ -52,7 +52,7 @@
5252
-o {{ ibp[channel.orderer.id].hostname }}:{{ ibp[channel.orderer.id].port }}
5353
-c {{ channel.name }}
5454
{{ '--tls' if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
55-
{{ '--cafile ' + ibp[channel.orderer.id].pem if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
55+
{{ '--cafile "' + ibp[channel.orderer.id].pem + '"' if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
5656
{{ '--ordererTLSHostnameOverride ' + ibp[channel.orderer.id].internal_hostname if ibp[channel.orderer.id].internal_hostname is defined else '' }}
5757
environment:
5858
CORE_PEER_MSPCONFIGPATH: "{{ channel.members[0].wallet }}/{{ channel.members[0].msp.admin.identity }}"

tasks/manage-channel/join-channel.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
-o {{ ibp[channel.orderer.id].hostname }}:{{ ibp[channel.orderer.id].port }}
1010
-c {{ channel.name }}
1111
{{ '--tls' if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
12-
{{ '--cafile ' + ibp[channel.orderer.id].pem if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
12+
{{ '--cafile "' + ibp[channel.orderer.id].pem + '"' if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
1313
{{ '--ordererTLSHostnameOverride ' + ibp[channel.orderer.id].internal_hostname if ibp[channel.orderer.id].internal_hostname is defined else '' }}
1414
environment:
1515
CORE_PEER_MSPCONFIGPATH: "{{ channel.members[0].wallet }}/{{ channel.members[0].msp.admin.identity }}"

tasks/manage-channel/update-channel.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
-o {{ ibp[channel.orderer.id].hostname }}:{{ ibp[channel.orderer.id].port }}
1111
-c {{ channel.name }}
1212
{{ '--tls' if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
13-
{{ '--cafile ' + ibp[channel.orderer.id].pem if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
13+
{{ '--cafile "' + ibp[channel.orderer.id].pem + '"' if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
1414
{{ '--ordererTLSHostnameOverride ' + ibp[channel.orderer.id].internal_hostname if ibp[channel.orderer.id].internal_hostname is defined else '' }}
1515
environment:
1616
CORE_PEER_MSPCONFIGPATH: "{{ channel.members[0].wallet }}/{{ channel.members[0].msp.admin.identity }}"
@@ -130,7 +130,7 @@
130130
-o {{ ibp[channel.orderer.id].hostname }}:{{ ibp[channel.orderer.id].port }}
131131
-c {{ channel.name }}
132132
{{ '--tls' if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
133-
{{ '--cafile ' + ibp[channel.orderer.id].pem if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
133+
{{ '--cafile "' + ibp[channel.orderer.id].pem + '"' if ibp[channel.orderer.id].protocol == 'grpcs' else '' }}
134134
{{ '--ordererTLSHostnameOverride ' + ibp[channel.orderer.id].internal_hostname if ibp[channel.orderer.id].internal_hostname is defined else '' }}
135135
environment:
136136
CORE_PEER_MSPCONFIGPATH: "{{ channel.members[0].wallet }}/{{ channel.members[0].msp.admin.identity }}"

tasks/manage-consortium.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
-o {{ ibp[orderer.id].hostname }}:{{ ibp[orderer.id].port }}
1010
-c testchainid
1111
{{ '--tls' if ibp[orderer.id].protocol == 'grpcs' else '' }}
12-
{{ '--cafile ' + ibp[orderer.id].pem if ibp[orderer.id].protocol == 'grpcs' else '' }}
12+
{{ '--cafile "' + ibp[orderer.id].pem + '"' if ibp[orderer.id].protocol == 'grpcs' else '' }}
1313
{{ '--ordererTLSHostnameOverride ' + ibp[orderer.id].internal_hostname if ibp[orderer.id].internal_hostname is defined else '' }}
1414
environment:
1515
CORE_PEER_MSPCONFIGPATH: "{{ organization.wallet }}/{{ organization.msp.admin.identity }}"
@@ -98,7 +98,7 @@
9898
-o {{ ibp[orderer.id].hostname }}:{{ ibp[orderer.id].port }}
9999
-c testchainid
100100
{{ '--tls' if ibp[orderer.id].protocol == 'grpcs' else '' }}
101-
{{ '--cafile ' + ibp[orderer.id].pem if ibp[orderer.id].protocol == 'grpcs' else '' }}
101+
{{ '--cafile "' + ibp[orderer.id].pem + '"' if ibp[orderer.id].protocol == 'grpcs' else '' }}
102102
{{ '--ordererTLSHostnameOverride ' + ibp[orderer.id].internal_hostname if ibp[orderer.id].internal_hostname is defined else '' }}
103103
environment:
104104
CORE_PEER_MSPCONFIGPATH: "{{ organization.wallet }}/{{ organization.msp.admin.identity }}"

tasks/manage-contract/install-contract-peer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
contract_installed: "{{ chaincode_list.stdout | join('') is search('Name: ' ~ contract.name ~ ', Version: ' ~ contract.version ~ ',') }}"
2020

2121
- name: Install contract on peer
22-
command: peer chaincode install {{ contract.package }}
22+
command: peer chaincode install "{{ contract.package }}"
2323
environment:
2424
CORE_PEER_ADDRESS: "{{ ibp[peer.id].hostname }}:{{ ibp[peer.id].port }}"
2525
CORE_PEER_MSPCONFIGPATH: "{{ member.wallet }}/{{ member.msp.admin.identity }}"

0 commit comments

Comments
 (0)