diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2023-04-14 12:37:30 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2023-04-14 12:37:30 +0200 |
commit | 59b5e6cbb13bf00f074ec9cd4944055cc36192bc (patch) | |
tree | 931e1acc203e8de4255b375d9749a0c91c900985 /roles/gitea/tasks/main.yml | |
parent | 89007ddb4f2b59c15ea773f877cf75c5e9ac714d (diff) | |
download | ansible_collection-59b5e6cbb13bf00f074ec9cd4944055cc36192bc.tar.gz |
gitea version pull sha
Diffstat (limited to 'roles/gitea/tasks/main.yml')
-rw-r--r-- | roles/gitea/tasks/main.yml | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/roles/gitea/tasks/main.yml b/roles/gitea/tasks/main.yml index a5d7081..36e5f43 100644 --- a/roles/gitea/tasks/main.yml +++ b/roles/gitea/tasks/main.yml @@ -37,6 +37,18 @@ state: directory become: yes +- name: pull sha256sum + uri: + url: 'https://dl.gitea.io/gitea/{{ gitea.version.ver }}/gitea-{{ gitea.version.ver }}-linux-amd64.sha256' + method: GET + return_content: yes + register: gitea_sha256_raw + +- name: set sha256sum + set_fact: + gitea_sha256: '{{ (gitea_sha256_raw.content | split(" "))[0] }}' + cacheable: false + - name: Check for update stat: path: /usr/local/bin/gitea @@ -47,7 +59,7 @@ - name: perform update include: update.yml when: - - (not gitea_bin_stat.stat.exists) or (gitea_bin_stat.stat.checksum != gitea.version.sha) + - (not gitea_bin_stat.stat.exists) or (gitea_bin_stat.stat.checksum != gitea_sha256) - name: Check if initial setup is needed include_tasks: secrets.yml |