From 8bef54b78449c5b25d34f7571476bd82576e591c Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 23 Jun 2021 16:12:28 +0200 Subject: [PATCH] Option fo force the download of the binary. --- defaults/main.yml | 1 + tasks/gitea.yml | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index b3eb533..d594bbc 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -7,6 +7,7 @@ # gitea_version: 1.14.3 gitea_download_url: 'https://dl.gitea.io/gitea/{{ gitea_version }}/gitea-{{ gitea_version }}-linux-amd64' +gitea_force_binary_download: False gitea_bin_path: /usr/local/bin/gitea gitea_conf_dir: /etc/gitea diff --git a/tasks/gitea.yml b/tasks/gitea.yml index 9614b44..9b39633 100644 --- a/tasks/gitea.yml +++ b/tasks/gitea.yml @@ -36,7 +36,22 @@ mode: 0755 - name: Download the gitea binary - get_url: url={{ gitea_download_url }} dest={{ gitea_bin_path }} owner=root group={{ gitea_group }} mode=0750 + get_url: + url: '{{ gitea_download_url }}' + dest: '{{ gitea_bin_path }}' + owner: root + group: '{{ gitea_group }}' + mode: 0750 + + - name: Force the download of the gitea binary to upgrade it + get_url: + url: '{{ gitea_download_url }}' + dest: '{{ gitea_bin_path }}' + owner: root + group: '{{ gitea_group }}' + mode: 0750 + force: true + when: gitea_force_binary_download - name: Install the required packages package: state=present use=auto name={{ gitea_required_packages }}