Skip to content

Instantly share code, notes, and snippets.

@melekes
Last active April 24, 2017 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melekes/dd79ff59816a8a5d41e863fb42bc322b to your computer and use it in GitHub Desktop.
Save melekes/dd79ff59816a8a5d41e863fb42bc322b to your computer and use it in GitHub Desktop.
Ansible playbook for upgrading Tendermint
---
- hosts: all
tasks:
- name: get version
shell: tendermint version
register: version
- name: copy and unpack binary if newer version is being installed
unarchive: >
src={{tendermint_download}}
dest=/usr/local/bin
remote_src=true
mode=0755
when: version.stdout.find(tendermint_version) == -1
notify: restart tendermint
handlers:
- name: restart tendermint
action: service name=tendermint state=restarted enabled=yes
vars:
tendermint_version: 0.9.1
tendermint_archive: "tendermint_{{tendermint_version}}_linux_amd64.zip"
tendermint_download: "https://s3-us-west-2.amazonaws.com/tendermint/{{tendermint_version}}/{{tendermint_archive}}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment