add swarm bootnodes from a gist list

This commit is contained in:
Jakub Sokołowski 2018-08-29 15:00:31 -04:00
parent 260b1249ae
commit 1271d4aae2
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
4 changed files with 16 additions and 3 deletions

View File

@ -41,8 +41,6 @@
file_type: file
register: account_files
- debug: msg={{account_files}}
- name: Read account addres
shell: 'cat {{ account_files.files[0].path }} | jq -r .address'
register: account_address

View File

@ -0,0 +1,14 @@
---
- name: Download list of bootnodes
uri:
url: 'https://gist.githubusercontent.com/homotopycolimit/db446fa3269a199762e67b2ca037dbeb/raw/8c522a4e64cf02ae0b02f4115bc84d12a5fa85ad/gistfile1.txt'
return_content: yes
register: bootnodes_raw
- name: Extract bootnode enodes
set_fact:
bootnodes: |
{{ bootnodes_raw.content.split()
| map('regex_findall', '^admin\.addPeer\(\"(.*)\"\)$')
| map('first')
| list }}

View File

@ -9,8 +9,8 @@
- '{{ cont_vol }}/data'
- '{{ cont_vol }}/store'
#- include_tasks: gen_keys.yml
- include_tasks: account.yml
- include_tasks: geth.yml
- include_tasks: bootnodes.yml
- include_tasks: swarm.yml
- include_tasks: consul.yml

View File

@ -24,6 +24,7 @@
--password=/keys/password
--store.path=/store
--ens-api='http://geth:{{ geth_rpc_port }}'
--bootnodes={{ bootnodes | join(",") }}
volumes:
- '{{ geth_vol }}/keys:/keys:rw'
- '{{ cont_vol }}/data:/data:rw'