Install Drone CLI

This commit is contained in:
Jim Martens 2020-01-04 14:49:00 +01:00
parent 080bacc465
commit be779df9b3
1 changed files with 16 additions and 0 deletions

View File

@ -13,3 +13,19 @@
- name: start drone docker container
docker_compose:
project_src: /etc/drone
- name: install drone cli
block:
- name: download drone cli
get_url:
url: https://github.com/drone/drone-cli/releases/latest/download/drone_linux_amd64.tar.gz
dest: /home/{{ ssh_user }}/drone_linux_amd64.tar.gz
- name: unpack the cli archive
unarchive:
dest: /home/{{ ssh_user }}
src: /home/{{ ssh_user }}/drone_linux_amd64.tar.gz
remote_src: yes
register: drone_unpack
- name: install drone cli
command:
cmd: install -t /usr/local/bin /home/{{ ssh_user }}/drone
when: drone_unpack.changed