diff --git a/defaults/main.yml b/defaults/main.yml index 4ed7fa4..cfc166a 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -70,13 +70,9 @@ nextcloud_preview_folder_name: "preview-generator" nextcloud_preview_docker_folder: "/{{ nextcloud_preview_folder_name }}" nextcloud_preview_host_folder: "{{ nextcloud_customized_container_src_path }}/{{ nextcloud_preview_folder_name }}" nextcloud_preview_first_run_finished_filename: "finished-first-run.keepit" -nextcloud_preview_squareSizes: "\"64 256 1024 2048\"" -nextcloud_preview_widthSizes: "\"64 256 1024 2048\"" -nextcloud_preview_heightSizes: "\"64 256 1024 2048\"" -nextcloud_preview_preview_max_x: 2048 -nextcloud_preview_preview_max_y: 2048 -nextcloud_preview_system_jpeg_quality: 60 -nextcloud_preview_app_jpeg_quality: "60" +nextcloud_preview_preview_max_x: null +nextcloud_preview_preview_max_y: null +nextcloud_preview_app_jpeg_quality: 80 # nextcloud_container_image_customizations_enabled controls whether a customized Nextcloud image will be built. # diff --git a/tasks/adjust_config.yml b/tasks/adjust_config.yml index af5e228..66ff419 100644 --- a/tasks/adjust_config.yml +++ b/tasks/adjust_config.yml @@ -32,40 +32,20 @@ cmd: |- docker exec --user={{ nextcloud_uid }}:{{ nextcloud_gid }} {{ nextcloud_identifier }}-server php /var/www/html/occ {{ item.appType }} --type={{ item.type }} --value={{ item.value }} -- {{ item.appConfig }} {{ item.configName }} with_items: - - appType: "config:app:set" - appConfig: "previewgenerator" - configName: "squareSizes" - type: string - value: "{{ nextcloud_preview_squareSizes }}" - - appType: "config:app:set" - appConfig: "previewgenerator" - configName: "widthSizes" - type: string - value: "{{ nextcloud_preview_widthSizes }}" - - appType: "config:app:set" - appConfig: "previewgenerator" - configName: "heightSizes" - type: string - value: "{{ nextcloud_preview_heightSizes }}" - appType: "config:system:set" appConfig: "" configName: "preview_max_x" - type: int + type: "string" value: "{{ nextcloud_preview_preview_max_x }}" - appType: "config:system:set" appConfig: "" configName: "preview_max_y" - type: int + type: "string" value: "{{ nextcloud_preview_preview_max_y }}" - - appType: "config:system:set" + - appType: "config:app:set" appConfig: "" configName: "jpeg_quality" type: int - value: "{{ nextcloud_preview_system_jpeg_quality }}" - - appType: "config:app:set" - appConfig: "preview" - configName: "jpeg_quality" - type: string value: "{{ nextcloud_preview_app_jpeg_quality }}" - name: "Check if {{ nextcloud_preview_first_run_finished_filename }} exists" diff --git a/tasks/validate_config.yml b/tasks/validate_config.yml index 8d03b1a..db340f1 100644 --- a/tasks/validate_config.yml +++ b/tasks/validate_config.yml @@ -14,6 +14,17 @@ - nextcloud_database_username - nextcloud_database_password +- name: Fail if deprecated Nextcloud settings are still defined + ansible.builtin.fail: + msg: >- + You need to drop setting (`{{ item }}`) as it is not used anymore in the Nextcloud role. + when: "item in vars" + with_items: + - nextcloud_preview_squareSizes + - nextcloud_preview_widthSizes + - nextcloud_preview_heightSizes + - nextcloud_preview_system_jpeg_quality + - name: (Deprecation) Catch and report renamed Nextcloud variables ansible.builtin.fail: msg: >-