Skip to content

Commit

Permalink
feat: add export-genesis playbook
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Jul 19, 2020
1 parent c8e2f82 commit cba5ae0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
14 changes: 14 additions & 0 deletions packages/deployment/ansible/export-genesis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---

- hosts: "{{ service }}"
user: "root"
#any_errors_fatal: true
gather_facts: no
strategy: free
vars:
- service: ag-chain-cosmos
- user: "{{ service }}"
- exported: "{{ SETUP_HOME }}/exported"
roles:
- stop
- export-genesis
10 changes: 10 additions & 0 deletions packages/deployment/ansible/roles/export-genesis/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- name: "Create exported-genesis.json"
become: yes
become_user: "{{ service }}"
shell: "{{ service }} export --for-zero-height > /home/{{ service }}/exported-genesis.json"

- name: "Fetch {{ exported | default('exported') }}/*/exported-genesis.json"
fetch:
dest: "{{ exported | default('exported') }}/{{ inventory_hostname }}/"
flat: yes
src: "/home/{{ service }}/exported-genesis.json"

0 comments on commit cba5ae0

Please sign in to comment.