From 12c3730662e499d3098364fb9c8818a410f595fd Mon Sep 17 00:00:00 2001 From: "pulsar89.5" Date: Fri, 19 Jan 2024 10:35:17 +0100 Subject: [PATCH] feat: Define gitea_version to lastest by default --- defaults/main.yml | 2 +- tasks/main.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 3a5d2f2..cd60fa8 100755 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -3,7 +3,7 @@ gitea_version_file: https://dl.gitea.io/gitea/version.json -gitea_version: "" +gitea_version: "latest" gitea_architecture: arm64 gitea_install_path: /opt/gitea diff --git a/tasks/main.yml b/tasks/main.yml index 4cffada..2d0bc8c 100755 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -18,13 +18,13 @@ url: "{{ gitea_version_file }}" return_content: true follow_redirects: all - when: not gitea_version | length > 0 + when: gitea_version == "latest" register: version_file - name: Extraire la dernière version ansible.builtin.set_fact: gitea_version: "{{ (version_file.content | from_json).latest.version }}" - when: not gitea_version | length > 0 + when: gitea_version == "latest" - name: Télécharger le binaire ansible.builtin.get_url: -- 2.39.5