|
---
|
|
|
|
- name: gather tendermint public keys
|
|
when: validators == true and tendermint_genesis_file is not defined
|
|
shell: "tendermint show_validator --home /etc/{{service}}/tendermint --log_level error"
|
|
register: pubkeys
|
|
changed_when: false
|
|
|
|
- name: register tendermint public keys as host facts
|
|
when: validators == true and tendermint_genesis_file is not defined
|
|
set_fact: "pubkey='{{pubkeys.stdout}}'"
|
|
connection: local
|
|
|
|
- name: copy generated tendermint genesis.json - genesis_time will be updated
|
|
when: tendermint_genesis_file is not defined
|
|
template:
|
|
src: genesis-server.json.j2
|
|
dest: "/etc/{{service}}/tendermint/genesis.json"
|
|
owner: "{{service}}"
|
|
group: "{{service}}"
|
|
|
|
- name: copy generated service genesis.json - genesis_time will be updated
|
|
when: (service_genesis_file is not defined) and (service != 'ethermint')
|
|
template:
|
|
src: genesis-service.json.j2
|
|
dest: "/etc/{{service}}/genesis.json"
|
|
owner: "{{service}}"
|
|
group: "{{service}}"
|
|
|
|
- name: copy pre-created tendermint genesis.json
|
|
when: tendermint_genesis_file is defined
|
|
copy: "src={{tendermint_genesis_file}} dest=/etc/{{service}}/tendermint/genesis.json owner={{service}} group={{service}}"
|
|
|
|
- name: copy pre-created service genesis.json
|
|
when: service_genesis_file is defined
|
|
copy: "src={{service_genesis_file}} dest=/etc/{{service}}/genesis.json owner={{service}} group={{service}}"
|
|
|
|
- name: copy tendermint config.toml
|
|
template:
|
|
src: config.toml.j2
|
|
dest: "/etc/{{service}}/tendermint/config.toml"
|
|
owner: "{{service}}"
|
|
group: "{{service}}"
|
|
|