Browse Source

Fixed AWS targetting when testnet has dash in the name

pull/1943/head
Greg Szabo 7 years ago
parent
commit
cfc1b4f426
10 changed files with 10 additions and 10 deletions
  1. +1
    -1
      ansible/install.yml
  2. +1
    -1
      ansible/reset.yml
  3. +1
    -1
      ansible/restart.yml
  4. +1
    -1
      ansible/roles/config/templates/config.toml.j2
  5. +1
    -1
      ansible/roles/config/templates/genesis-server.json.j2
  6. +1
    -1
      ansible/start.yml
  7. +1
    -1
      ansible/status.yml
  8. +1
    -1
      ansible/stop.yml
  9. +1
    -1
      ansible/ubuntu16-patch.yml
  10. +1
    -1
      ansible/upgrade-reset.yml

+ 1
- 1
ansible/install.yml View File

@ -2,7 +2,7 @@
#variable "service" is required
- hosts: "{{ lookup('env','TF_VAR_TESTNET_NAME') }}:tag_Environment_{{ lookup('env','TF_VAR_TESTNET_NAME') }}"
- hosts: "{{ lookup('env','TF_VAR_TESTNET_NAME') }}:tag_Environment_{{ lookup('env','TF_VAR_TESTNET_NAME') | regex_replace('-','_') }}"
any_errors_fatal: "{{validators | bool | default(true)}}"
roles:
- install


+ 1
- 1
ansible/reset.yml View File

@ -1,6 +1,6 @@
---
- hosts: "{{ lookup('env','TF_VAR_TESTNET_NAME') }}:tag_Environment_{{ lookup('env','TF_VAR_TESTNET_NAME') }}"
- hosts: "{{ lookup('env','TF_VAR_TESTNET_NAME') }}:tag_Environment_{{ lookup('env','TF_VAR_TESTNET_NAME') | regex_replace('-','_') }}"
become: yes
roles:
- stop


+ 1
- 1
ansible/restart.yml View File

@ -2,7 +2,7 @@
#variable "service" is required
- hosts: "{{ lookup('env','TF_VAR_TESTNET_NAME') }}:tag_Environment_{{ lookup('env','TF_VAR_TESTNET_NAME') }}"
- hosts: "{{ lookup('env','TF_VAR_TESTNET_NAME') }}:tag_Environment_{{ lookup('env','TF_VAR_TESTNET_NAME') | regex_replace('-','_') }}"
roles:
- stop
- start

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

@ -13,7 +13,7 @@ laddr = "tcp://0.0.0.0:46657"
[p2p]
laddr = "tcp://0.0.0.0:46656"
{% if validators == true or validators == 'true' %}
{% set comma = joiner(",") %}seeds = "{% for host in ((groups[testnet_name]|default([]))+(groups['tag_Environment_'~testnet_name]|default([])))|difference(inventory_hostname) %}{{ comma() }}{{hostvars[host]["inventory_hostname"]}}:46656{% endfor %}"
{% 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]["inventory_hostname"]}}:46656{% endfor %}"
{% else %}
seeds = "{{ seeds | default() }}"
{% endif %}

+ 1
- 1
ansible/roles/config/templates/genesis-server.json.j2 View File

@ -5,7 +5,7 @@
[
{% if (validators == true) or (validators == 'true') %}
{% set comma = joiner(",") %}
{% for host in (groups[testnet_name]|default([]))+(groups['tag_Environment_'~testnet_name]|default([])) %}
{% for host in (groups[testnet_name]|default([]))+(groups['tag_Environment_'~(testnet_name|regex_replace('-','_'))]|default([])) %}
{{ comma() }}
{
"pub_key": {


+ 1
- 1
ansible/start.yml View File

@ -2,7 +2,7 @@
#variable "service" is required
- hosts: "{{ lookup('env','TF_VAR_TESTNET_NAME') }}:tag_Environment_{{ lookup('env','TF_VAR_TESTNET_NAME') }}"
- hosts: "{{ lookup('env','TF_VAR_TESTNET_NAME') }}:tag_Environment_{{ lookup('env','TF_VAR_TESTNET_NAME') | regex_replace('-','_') }}"
roles:
- start

+ 1
- 1
ansible/status.yml View File

@ -2,7 +2,7 @@
#variable "service" is required
- hosts: "{{ lookup('env','TF_VAR_TESTNET_NAME') }}:tag_Environment_{{ lookup('env','TF_VAR_TESTNET_NAME') }}"
- hosts: "{{ lookup('env','TF_VAR_TESTNET_NAME') }}:tag_Environment_{{ lookup('env','TF_VAR_TESTNET_NAME') | regex_replace('-','_') }}"
roles:
- status

+ 1
- 1
ansible/stop.yml View File

@ -2,7 +2,7 @@
#variable "service" is required
- hosts: "{{ lookup('env','TF_VAR_TESTNET_NAME') }}:tag_Environment_{{ lookup('env','TF_VAR_TESTNET_NAME') }}"
- hosts: "{{ lookup('env','TF_VAR_TESTNET_NAME') }}:tag_Environment_{{ lookup('env','TF_VAR_TESTNET_NAME') | regex_replace('-','_') }}"
roles:
- stop

+ 1
- 1
ansible/ubuntu16-patch.yml View File

@ -1,7 +1,7 @@
---
#Ubuntu 16.04 is not installing the python package in the standard installation on DigitalOcean. This "patch" will install it so the rest of the ansible playbooks can work properly.
- hosts: "{{ lookup('env','TF_VAR_TESTNET_NAME') }}:tag_Environment_{{ lookup('env','TF_VAR_TESTNET_NAME') }}"
- hosts: "{{ lookup('env','TF_VAR_TESTNET_NAME') }}:tag_Environment_{{ lookup('env','TF_VAR_TESTNET_NAME') | regex_replace('-','_') }}"
gather_facts: no
tasks:
- raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)


+ 1
- 1
ansible/upgrade-reset.yml View File

@ -2,7 +2,7 @@
#variable "service" is required
- hosts: "{{ lookup('env','TF_VAR_TESTNET_NAME') }}:tag_Environment_{{ lookup('env','TF_VAR_TESTNET_NAME') }}"
- hosts: "{{ lookup('env','TF_VAR_TESTNET_NAME') }}:tag_Environment_{{ lookup('env','TF_VAR_TESTNET_NAME') | regex_replace('-','_') }}"
roles:
- stop
- install


Loading…
Cancel
Save