download just if neeeded
This commit is contained in:
parent
63ce35f0af
commit
fc0e34dca9
1 changed files with 6 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue