Browse Source

Minor feaure addition

pull/1943/head
Greg Szabo 7 years ago
parent
commit
7e81a89919
2 changed files with 8 additions and 0 deletions
  1. +5
    -0
      ansible/roles/config/tasks/main.yml
  2. +3
    -0
      ansible/roles/install/tasks/main.yml

+ 5
- 0
ansible/roles/config/tasks/main.yml View File

@ -2,15 +2,18 @@
- name: gather tendermint public keys
when: (validators == true or validators == 'true') and tendermint_genesis_file is not defined
tags: reconfig-toml,reconfig-genesis
command: "/usr/bin/tendermint show_validator --home /etc/{{service}} --log_level error"
register: pubkeys
changed_when: false
- name: resetting permissions from root after gathering public keys
tags: reconfig-toml,reconfig-genesis
file: "path=/etc/{{service}} owner={{service}} group={{service}} recurse=yes"
- name: register tendermint public keys as host facts
when: (validators == true or validators == 'true') and tendermint_genesis_file is not defined
tags: reconfig-toml,reconfig-genesis
set_fact: "pubkey='{{pubkeys.stdout}}'"
connection: local
@ -38,6 +41,7 @@
- name: Copy validator network files for non-validators
when: validators == false or validators == 'false'
tags: reconfig-toml,reconfig-genesis
get_url: "url={{item['src']}} dest={{item['dst']}} force=yes"
with_items:
- { src: "https://raw.githubusercontent.com/tendermint/testnets/master/{{validator_network}}/{{service}}/genesis.json" , dst: "/etc/{{service}}/genesis.json" }
@ -45,6 +49,7 @@
- name: Set validator network files permissions for non-validators
when: validators == false or validators == 'false'
tags: reconfig-toml,reconfig-genesis
file: "path={{item}} owner={{service}} group={{service}}"
with_items:
- "/etc/{{service}}/genesis.json"


+ 3
- 0
ansible/roles/install/tasks/main.yml View File

@ -13,6 +13,9 @@
- name: Restart journald
service: name=systemd-journald state=restarted
#TODO include is deprecated in Ansible 2.4.0 and will be removed in 2.8.0
#Replace it with include_tasks
- include: debian.yml
when: ansible_os_family == "Debian"


Loading…
Cancel
Save