Browse Source

persistent_peers changes

pull/1943/head
Greg Szabo 7 years ago
parent
commit
426938e2b4
2 changed files with 4 additions and 5 deletions
  1. +1
    -0
      ansible/roles/config/defaults/main.yml
  2. +3
    -5
      ansible/roles/config/templates/config.toml.j2

+ 1
- 0
ansible/roles/config/defaults/main.yml View File

@ -2,6 +2,7 @@
#genesis_file: "<undefined>"
app_options_file: "app_options_files/public_testnet"
seeds: ""
persistent_peers: ""
testnet_name: testnet1
validators: true

+ 3
- 5
ansible/roles/config/templates/config.toml.j2 View File

@ -83,14 +83,12 @@ unsafe = false
laddr = "tcp://0.0.0.0:46656"
# Comma separated list of seed nodes to connect to
{% if validators == true or validators == 'true' %}
{% set comma = joiner(",") %}seeds = "{% for host in ((groups[testnet_name]|default([]))+(groups['tag_Environment_'~(testnet_name|regex_replace('-','_'))]|default([])))|difference(inventory_hostname) %}{{ comma() }}{{hostvars[host]["nodeid"]}}@{{hostvars[host]["inventory_hostname"]}}:46656{% endfor %}"
{% else %}
seeds = "{{ seeds | default() }}"
{% endif %}
# Comma separated list of nodes to keep persistent connections to
persistent_peers = ""
{% set comma = joiner(",") %}persistent_peers = "{% for host in ((groups[testnet_name]|default([]))+(groups['tag_Environment_'~(testnet_name|regex_replace('-','_'))]|default([])))|difference(inventory_hostname) %}{{ comma() }}{{hostvars[host]["nodeid"]}}@{{hostvars[host]["inventory_hostname"]}}:46656{% endfor %}"
{% else %}
persistent_peers = "{{ persistent_peers | default() }}"
# Path to address book
addr_book_file = "config/addrbook.json"


Loading…
Cancel
Save