Merge pull request 'Adds task to install a list of Nextcloud apps' (#7) from feature/auto-install-apps into master

Reviewed-on: #7
This commit is contained in:
Jan Beilicke 2023-12-10 11:43:16 +01:00
commit 19e2864e9b
2 changed files with 14 additions and 0 deletions

View file

@ -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:

View file

@ -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