Change of preview generation default values. (#20)
* Change of preview generation default values. According to the [docs](https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/previews_configuration.html), some variables are unsupported, while the default of others have changed. * is defined is not used, changing "null" handling Luckily it works as numbers as string are accepted. * check for unused NC variables * this is an app setting, not a system setting * Deprecate nextcloud_preview_system_jpeg_quality, not nextcloud_preview_app_jpeg_quality Ref: https://github.com/mother-of-all-self-hosting/ansible-role-nextcloud/pull/20#discussion_r1686902142 --------- Co-authored-by: Slavi Pantaleev <slavi@devture.com>
This commit is contained in:
parent
fd4b567e2b
commit
6b3c9b95d5
3 changed files with 17 additions and 30 deletions
|
@ -70,13 +70,9 @@ nextcloud_preview_folder_name: "preview-generator"
|
||||||
nextcloud_preview_docker_folder: "/{{ nextcloud_preview_folder_name }}"
|
nextcloud_preview_docker_folder: "/{{ nextcloud_preview_folder_name }}"
|
||||||
nextcloud_preview_host_folder: "{{ nextcloud_customized_container_src_path }}/{{ 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_first_run_finished_filename: "finished-first-run.keepit"
|
||||||
nextcloud_preview_squareSizes: "\"64 256 1024 2048\""
|
nextcloud_preview_preview_max_x: null
|
||||||
nextcloud_preview_widthSizes: "\"64 256 1024 2048\""
|
nextcloud_preview_preview_max_y: null
|
||||||
nextcloud_preview_heightSizes: "\"64 256 1024 2048\""
|
nextcloud_preview_app_jpeg_quality: 80
|
||||||
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_container_image_customizations_enabled controls whether a customized Nextcloud image will be built.
|
# nextcloud_container_image_customizations_enabled controls whether a customized Nextcloud image will be built.
|
||||||
#
|
#
|
||||||
|
|
|
@ -32,40 +32,20 @@
|
||||||
cmd: |-
|
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 }}
|
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:
|
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"
|
- appType: "config:system:set"
|
||||||
appConfig: ""
|
appConfig: ""
|
||||||
configName: "preview_max_x"
|
configName: "preview_max_x"
|
||||||
type: int
|
type: "string"
|
||||||
value: "{{ nextcloud_preview_preview_max_x }}"
|
value: "{{ nextcloud_preview_preview_max_x }}"
|
||||||
- appType: "config:system:set"
|
- appType: "config:system:set"
|
||||||
appConfig: ""
|
appConfig: ""
|
||||||
configName: "preview_max_y"
|
configName: "preview_max_y"
|
||||||
type: int
|
type: "string"
|
||||||
value: "{{ nextcloud_preview_preview_max_y }}"
|
value: "{{ nextcloud_preview_preview_max_y }}"
|
||||||
- appType: "config:system:set"
|
- appType: "config:app:set"
|
||||||
appConfig: ""
|
appConfig: ""
|
||||||
configName: "jpeg_quality"
|
configName: "jpeg_quality"
|
||||||
type: int
|
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 }}"
|
value: "{{ nextcloud_preview_app_jpeg_quality }}"
|
||||||
|
|
||||||
- name: "Check if {{ nextcloud_preview_first_run_finished_filename }} exists"
|
- name: "Check if {{ nextcloud_preview_first_run_finished_filename }} exists"
|
||||||
|
|
|
@ -14,6 +14,17 @@
|
||||||
- nextcloud_database_username
|
- nextcloud_database_username
|
||||||
- nextcloud_database_password
|
- 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
|
- name: (Deprecation) Catch and report renamed Nextcloud variables
|
||||||
ansible.builtin.fail:
|
ansible.builtin.fail:
|
||||||
msg: >-
|
msg: >-
|
||||||
|
|
Loading…
Reference in a new issue