From ad2215ee82a87f11c23a7b50c7cc09de9bb7c802 Mon Sep 17 00:00:00 2001 From: Luke Hoersten Date: Sat, 25 Apr 2026 20:04:39 -0500 Subject: Only run pleroma migrate on version change or first install --- pleroma/otp/tasks/instance.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'pleroma/otp/tasks') diff --git a/pleroma/otp/tasks/instance.yaml b/pleroma/otp/tasks/instance.yaml index 3a48991..b69477d 100644 --- a/pleroma/otp/tasks/instance.yaml +++ b/pleroma/otp/tasks/instance.yaml @@ -66,6 +66,11 @@ become: yes systemd: name="pleroma@{{pleroma_instance}}.service" enabled="yes" state="started" +- name: check if pleroma binary is present + stat: + path: "/opt/pleroma/bin/pleroma_ctl" + register: pleroma_binary + - name: migrate db become: yes command: "/opt/pleroma/bin/pleroma_ctl migrate" @@ -73,4 +78,4 @@ chdir: "/opt/pleroma/" environment: PLEROMA_CONFIG_PATH: "/etc/pleroma/{{pleroma_instance}}.config.exs" - changed_when: false + when: pleroma_binary.stat.exists and not installed_version.stat.exists -- cgit v1.2.3