From a085e0cc5c81e354417819aa9911227da1a81f35 Mon Sep 17 00:00:00 2001 From: Jeffrey van Pelt Date: Mon, 8 Jan 2024 16:47:39 +0100 Subject: [PATCH] Added check to stop execution when the remote version is higher then the currently installed --- tasks/set_gitea_version.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tasks/set_gitea_version.yml b/tasks/set_gitea_version.yml index c01a674..7674b7f 100644 --- a/tasks/set_gitea_version.yml +++ b/tasks/set_gitea_version.yml @@ -40,6 +40,12 @@ gitea_version_target: "{{ gitea_version }}" 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" 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 }}"