Skip to content

Instantly share code, notes, and snippets.

@yosmoc
Last active August 29, 2015 14:07
Show Gist options
  • Save yosmoc/56feebcb113d042fc5e6 to your computer and use it in GitHub Desktop.
Save yosmoc/56feebcb113d042fc5e6 to your computer and use it in GitHub Desktop.
AnsibleでLinuxに最新版のpecoをインストールする ref: http://qiita.com/samurai20000@github/items/8d77f4b5a503ca58b64e
- name: Get latest peco version
shell: >
curl -sI https://github.com/peco/peco/releases/latest | awk -F'/' '/^Location:/{print $NF}'
register: peco_latest_version
- name: Download latest peco
get_url: url=https://github.com/peco/peco/releases/download/{{ peco_latest_version.stdout }}/peco_linux_amd64.tar.gz dest=/tmp/peco_linux_amd64.tar.gz
- name: Extract peco
unarchive: src=/tmp/peco_linux_amd64.tar.gz dest=/tmp/
- name: Copy to /usr/bin/
copy: src=/tmp/peco_linux_amd64/peco dest=/usr/bin/ mode=0755
- name: Get latest peco version
shell: >
curl -sI https://github.com/peco/peco/releases/latest | awk -F'/' '/^Location:/{print $NF}'
register: peco_latest_version
- name: Download latest peco
get_url: url=https://github.com/peco/peco/releases/download/{{ peco_latest_version.stdout }}/peco_linux_amd64.tar.gz dest=/tmp/peco_linux_amd64.tar.gz
- name: Extract peco
unarchive: src=/tmp/peco_linux_amd64.tar.gz dest=/tmp/
- name: Copy to /usr/bin/
copy: src=/tmp/peco_linux_amd64/peco dest=/usr/bin/ mode=0755
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment