Preparing spec.json for terraform integration

This commit is contained in:
ArseniiPetrovich 2018-05-25 18:37:59 +03:00
parent 5f20fbc1bf
commit 1e7fb6f08f
3 changed files with 11 additions and 2 deletions

View File

@ -71,6 +71,8 @@ key_name: "id_rsa.pub"
#If this variable is set to "True" all the VMs will be rebooted after setup.
reboot_after_completion: false
"Path to spec.json file. If no file provided, spec.json will be downloaded from GitHub
spec_json: ""
##Bootnode-related variables.

View File

@ -7,4 +7,6 @@ home: "/home/{{ username }}"
GENESIS_NETWORK_NAME: "PoA"
MAIN_REPO_FETCH: "poanetwork"
GENESIS_BRANCH: "master"
GENESIS_BRANCH: "master"
spec_json: ""

View File

@ -1,6 +1,11 @@
---
- name: Copy spec.json to remote machine
copy: src={{ spec_json }} dest={{ home }}/ mode=0644 group={{ username }} owner={{ username }}
when: spec_json != ""
- name: Download spec.json
get_url: url={{ item }} dest={{ home }}/ mode=0644 group={{ username }} owner={{ username }}
with_items:
- "https://raw.githubusercontent.com/{{ MAIN_REPO_FETCH }}/poa-chain-spec/{{ GENESIS_BRANCH }}/spec.json"
- "https://raw.githubusercontent.com/{{ MAIN_REPO_FETCH }}/poa-chain-spec/{{ GENESIS_BRANCH }}/bootnodes.txt"
- "https://raw.githubusercontent.com/{{ MAIN_REPO_FETCH }}/poa-chain-spec/{{ GENESIS_BRANCH }}/bootnodes.txt"
when: spec_json == ""