diff --git a/tasks/core/apps.yml b/tasks/core/apps.yml index a05c6c9..5981e4c 100644 --- a/tasks/core/apps.yml +++ b/tasks/core/apps.yml @@ -41,23 +41,24 @@ - name: Install external apps block: - name: Find full nextcloud version - command: ./occ -V + command: ./occ status --output=json args: chdir: "{{ nextcloud_installation_dir }}" become: true become_user: "{{ nextcloud_file_owner }}" - register: nextcloud_full_version + register: _result changed_when: false + - name: Remove non-json text from command output + set_fact: + nextcloud_full_version: + "{{ (_result.stdout | from_json)['versionstring'] }}" + - name: Create app json file url set_fact: nextcloud_app_store_json_url: >- https://apps.nextcloud.com/api/v1/platform/{{ - nextcloud_full_version.stdout_lines[-1] - | regex_replace( - '.* ([0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2})$', - '\1' - ) + nextcloud_full_version }}/apps.json changed_when: false