From aac3f53d950d095338c9ad0dafa5d36d2df17dc8 Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Tue, 30 Aug 2022 07:13:25 -0500 Subject: [PATCH] gitea: fix bugs with auto upgrade --- roles/gitea/tasks/install.yaml | 1 + roles/gitea/tasks/pre.yaml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/roles/gitea/tasks/install.yaml b/roles/gitea/tasks/install.yaml index 7591750..95eb2af 100644 --- a/roles/gitea/tasks/install.yaml +++ b/roles/gitea/tasks/install.yaml @@ -10,3 +10,4 @@ notify: - restart gitea retries: 3 + when: gitea_version != gitea_local_version diff --git a/roles/gitea/tasks/pre.yaml b/roles/gitea/tasks/pre.yaml index b160c4c..7524522 100644 --- a/roles/gitea/tasks/pre.yaml +++ b/roles/gitea/tasks/pre.yaml @@ -6,7 +6,7 @@ - name: set gitea_installed set_fact: - gitea_installed: st.stat.exists + gitea_installed: "{{ st.stat.exists | bool }}" - block: - name: determine latest version @@ -36,7 +36,7 @@ - name: set gitea_local_version to 0 set_fact: gitea_local_version: "0" - when: not gitea_installed | bool + when: not (gitea_installed | bool) - block: - name: get checksums