download just if neeeded

This commit is contained in:
Kekskurse 2023-08-07 00:04:32 +02:00
parent 63ce35f0af
commit fc0e34dca9
Signed by: kekskurse
GPG key ID: 728ACCB59341E7E4

View file

@ -55,11 +55,17 @@
group: git
mode: '0500'
- name: Check if forgejo version is already downloaded
stat:
path: "/usr/local/bin/forgejo-{{forgejo}}-linux-amd64"
register: forgejo_result
- name: Download Forgejo
get_url:
url: "https://codeberg.org/forgejo/forgejo/releases/download/v{{ forgejo }}/forgejo-{{ forgejo }}-linux-amd64"
dest: "/usr/local/bin/forgejo-{{forgejo}}-linux-amd64"
mode: '0755'
when: not forgejo_result.stat.exists
- name: Create a symbolic link
ansible.builtin.file: