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