diff --git a/defaults/main.yml b/defaults/main.yml index a708a3c..9dbe9b1 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -24,6 +24,7 @@ nextcloud_overwrite_cli_url: nextcloud_overwrite_host: nextcloud_overwrite_protocol: nextcloud_enable_restic_compose_backup: False +nextcloud_app_list_to_install: [] restic_aws_access_key_id: restic_aws_secret_access_key: restic_repository: diff --git a/tasks/main.yml b/tasks/main.yml index 572fe16..97754f4 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -151,6 +151,19 @@ chdir: /home/{{ docker_user }}/nextcloud/ cmd: "docker-compose exec --user root nextcloud-app /bin/sh -c 'chown -R www-data: /var/www/html'" +- name: "docker-compose: Install Nextcloud apps (will not fail)" + shell: + chdir: /home/{{ docker_user }}/nextcloud/ + cmd: docker-compose exec -u www-data nextcloud-app /bin/sh -c './occ app:install "{{ item }}"' + loop: "{{ nextcloud_app_list_to_install }}" + when: nextcloud_app_list_to_install | count + failed_when: false + register: nextcloud_app_install_result + +- name: "Output app install result" + debug: + var: "{{ nextcloud_app_install_result }}" + - name: "Test whether Nextcloud is healthy from the outside" when: not ansible_check_mode become: false