diff --git a/states/nextcloud/apps.sls b/states/nextcloud/apps.sls new file mode 100644 index 0000000..d43b163 --- /dev/null +++ b/states/nextcloud/apps.sls @@ -0,0 +1,13 @@ +--- +{%- from "nextcloud/map.jinja" import nextcloud with context %} +{%- for app in nextcloud.apps %} +nextcloud-apps-install-{{ app }}: + cmd.run: + - name: php {{ nextcloud.install_dir }}/nextcloud/occ app:install {{ app }} + - runas: {{ nextcloud.user }} +{%- endfor %} + +nextcloud-apps-update: + cmd.run: + - name: php {{ nextcloud.install_dir }}/nextcloud/occ app:update --all + - runas: {{ nextcloud.user }} diff --git a/states/nextcloud/defaults.yaml b/states/nextcloud/defaults.yaml index b30b27a..ca1fa7a 100644 --- a/states/nextcloud/defaults.yaml +++ b/states/nextcloud/defaults.yaml @@ -6,6 +6,9 @@ nextcloud: release_dir: /usr/local/apps/releases user: www-data group: www-data + apps: + - calendar + - contacts config: instanceid: '' passwordsalt: '' diff --git a/states/nextcloud/init.sls b/states/nextcloud/init.sls index 07b0c86..00ad38c 100644 --- a/states/nextcloud/init.sls +++ b/states/nextcloud/init.sls @@ -4,3 +4,4 @@ include: - redis - .install - .config + - .apps