1
0
Fork 0

ansible_github_latest_release hinzugefügt

This commit is contained in:
gpkvt 2023-08-10 09:52:09 +02:00
parent cff1baf19e
commit 18ea28b0a1
1 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,12 @@
- name: Get release_info version
set_fact:
release_info: "{{ lookup('ansible.builtin.url', 'https://api.github.com/repos/Mikescher/better-docker-ps/releases/latest', split_lines=False) | from_json }}"
- name: Dowload latest version
ansible.builtin.get_url:
url: "https://github.com/Mikescher/better-docker-ps/releases/download/{{ release_info['tag_name'] }}/dops_linux-amd64-static"
dest: "/usr/local/bin/dops"
when: release_info
become: true
become_user: root
become_method: sudo