fix loading account JSON if not specified

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-06-03 16:10:14 +02:00
parent a5706e5793
commit d0bd08decc
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 10 additions and 8 deletions

View File

@ -69,15 +69,17 @@
group: docker
state: link
- name: Geth | Save account address
slurp:
src: '{{ geth_account_json_file }}'
register: geth_account
- name: Geth | Save account address
slurp:
src: '{{ geth_account_json_file }}'
when: geth_account_json is not defined
register: geth_account
- name: Geth | Extract account JSON
set_fact:
geth_account_json: '{{ (geth_account.content | b64decode | from_json) }}'
when: geth_account_json is not defined
- name: Geth | Extract account JSON
set_fact:
geth_account_json: '{{ (geth_account.content | b64decode | from_json) }}'
- name: Geth | Extract account address
set_fact:
geth_account_addr: '{{ geth_account_json["address"] }}'