Skip to content

Commit

Permalink
Fix an issue with Ubuntu Server 23.04 where download form App-store i…
Browse files Browse the repository at this point in the history
…ssues an error when the app is already installed, but disabled. Also no download is then necessary.
  • Loading branch information
marioqxx committed May 12, 2023
1 parent f83f2ac commit bced1c3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions roles/install_nextcloud/tasks/nc_apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
ansible.builtin.command: php occ app:install "{{ nc_app_name }}"
args:
chdir: "{{ nextcloud_webroot }}"
when: (nc_app_source is string) and (nc_app_source | length == 0)
when:
- (nc_app_source is string) and (nc_app_source | length == 0)
- nc_app_name not in nc_available_apps.disabled
register: output
changed_when: "output.rc == 0"

Expand All @@ -33,7 +35,9 @@
owner: "{{ nextcloud_websrv_user }}"
group: "{{ nextcloud_websrv_group }}"
creates: "{{ nextcloud_webroot }}/apps/{{ nc_app_name }}"
when: (nc_app_source is string) and (nc_app_source | length > 0)
when:
- (nc_app_source is string) and (nc_app_source | length > 0)
- nc_app_name not in nc_available_apps.disabled

- name: "[App] - Enable the application \"{{ nc_app_name }}\""
become_user: "{{ nextcloud_websrv_user }}"
Expand Down

0 comments on commit bced1c3

Please sign in to comment.