1
1
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_gitea.git synced 2024-08-16 11:39:50 +02:00

Added check to stop execution when the remote version is higher then the currently installed

This commit is contained in:
Jeffrey van Pelt 2024-01-08 16:47:39 +01:00
parent c5df1e57a1
commit a085e0cc5c
No known key found for this signature in database
GPG key ID: 39EFF6AA1F5B11A0

View file

@ -40,6 +40,12 @@
gitea_version_target: "{{ gitea_version }}" gitea_version_target: "{{ gitea_version }}"
when: gitea_version != "latest" when: gitea_version != "latest"
- name: 'Assert that remote version is higher'
ansible.builtin.assert:
that:
- gitea_active_version is version(gitea_remote_version, 'lt')
fail_msg: ERROR: Remote version is lower then current version!
- name: "Generate gitea download URL" - name: "Generate gitea download URL"
ansible.builtin.set_fact: ansible.builtin.set_fact:
gitea_dl_url: "https://github.com/go-gitea/gitea/releases/download/v{{ gitea_version_target }}/gitea-{{ gitea_version_target }}-linux-{{ gitea_arch }}" gitea_dl_url: "https://github.com/go-gitea/gitea/releases/download/v{{ gitea_version_target }}/gitea-{{ gitea_version_target }}-linux-{{ gitea_arch }}"