From c8de62ccafacf4501034c7d31b8892d254e31f35 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Fri, 15 Oct 2021 12:09:00 +0200 Subject: [PATCH] updated nextcloud state --- states/nextcloud/config.sls | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/states/nextcloud/config.sls b/states/nextcloud/config.sls index 1eb8b90..d117f71 100644 --- a/states/nextcloud/config.sls +++ b/states/nextcloud/config.sls @@ -1,5 +1,6 @@ --- {%- from "nextcloud/map.jinja" import nextcloud with context %} +{%- set _ = nextcloud.config.update({"version": salt['nextcloud.get_version'](nextcloud.install_dir + "/nextcloud/version.php")}) %} nextcloud-config: file.managed: - name: {{ nextcloud.install_dir }}/nextcloud/config/config.php @@ -7,3 +8,10 @@ nextcloud-config: - user: {{ nextcloud.user }} - group: {{ nextcloud.group }} - template: jinja + +nextcloud-upgrade: + cmd.run: + - name: php {{ nextcloud.install_dir }}/nextcloud/occ upgrade + - runas: {{ nextcloud.user }} + - onchanges: + - archive: nextcloud-archive