feat(apps): allow checking app integrity

This commit is contained in:
transcaffeine 2021-11-21 08:29:12 +01:00
parent a907549dc9
commit ea33ee5ea7
Signed by: transcaffeine
GPG Key ID: 03624C433676E465
2 changed files with 11 additions and 0 deletions

View File

@ -3,3 +3,5 @@
nextcloud_container_name: nextcloud nextcloud_container_name: nextcloud
nextcloud_apps: [] nextcloud_apps: []
nextcloud_run_user: nextcloud nextcloud_run_user: nextcloud
nextcloud_apps_check_integrity: false

View File

@ -48,3 +48,12 @@
loop: "{{ nextcloud_apps }}" loop: "{{ nextcloud_apps }}"
notify: notify:
- restart-nextcloud - restart-nextcloud
- name: Ensure app integrity
community.docker.docker_container_exec:
container: "{{ nextcloud_container_name }}"
command: "php occ integrity:check-app {{ item.name }}"
user: "{{ nextcloud_run_user }}"
tty: yes
when: nextcloud_apps_check_integrity and item.state|default('present') in ['latest', 'present']
loop: "{{ nextcloud_apps }}"