32 lines
852 B
YAML
32 lines
852 B
YAML
---
|
||
# tasks file for drone_runner_exec
|
||
|
||
- name: Get version file
|
||
ansible.builtin.uri:
|
||
url: "{{ drone_runner_exec_url }}"
|
||
return_content: true
|
||
follow_redirects: all
|
||
register: releases
|
||
|
||
- name: Extract URL
|
||
ansible.builtin.set_fact:
|
||
browser_download_url: >
|
||
{{
|
||
releases.json.assets |
|
||
selectattr('browser_download_url', 'search', 'linux') |
|
||
selectattr('browser_download_url', 'search', drone_runner_exec_architecture) |
|
||
map(attribute='browser_download_url')
|
||
}}
|
||
|
||
- name: Install runner
|
||
ansible.builtin.unarchive:
|
||
src: "{{ browser_download_url | first }}"
|
||
dest: /usr/local/bin/
|
||
remote_src: true
|
||
list_files: true
|
||
owner: "{{ drone_runner_exec_user }}"
|
||
group: "{{ drone_runner_exec_group }}"
|
||
mode: u=rwX,g=rX,o=rX
|
||
become: true
|
||
notify: Restart drone-runner-exec.service
|