From 5fb273af8ea757e5627c4b09582705e42aa1d8e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Sun, 30 Jun 2024 09:49:33 +0200 Subject: refactor(roles/nextcloud): bump nextcloud version and config --- roles/nextcloud/defaults/main.yml | 24 +++++++++++++++--------- roles/nextcloud/occ.yml | 24 ++++++++++++------------ roles/nextcloud/tasks/main.yml | 3 +-- 3 files changed, 28 insertions(+), 23 deletions(-) diff --git a/roles/nextcloud/defaults/main.yml b/roles/nextcloud/defaults/main.yml index 2dc20c7..a90917a 100644 --- a/roles/nextcloud/defaults/main.yml +++ b/roles/nextcloud/defaults/main.yml @@ -1,9 +1,9 @@ --- -nextcloud__package_name: nextcloud-27.1.5 +nextcloud__package_name: nextcloud-28.0.3 nextcloud__package_dependencies: - - php-pgsql-8.1.27 - - php-pdo_pgsql-8.1.27 + - php-pgsql-8.2.20 + - php-pdo_pgsql-8.2.20 nextcloud__db_name: nextcloud nextcloud__db_user: nextcloud @@ -25,13 +25,16 @@ nextcloud__owned_directories: - data - updater -nextcloud__php_service_name: php81_fpm -nextcloud__php_configuration_file: /etc/php-8.1.ini +nextcloud__php_bin: php-8.2 +nextcloud__php_service_name: php82_fpm +nextcloud__php_configuration_file: /etc/php-8.2.ini nextcloud__php_fpm_configuration_file: /etc/php-fpm.ini nextcloud__occ_system_settings: - option: trusted_domains value: "1 --value={{ nextcloud__domain_name }}" + - option: trusted_domains + value: "2 --value={{ ansible_host }}" - option: skeletondirectory value: "" @@ -39,8 +42,8 @@ nextcloud__disabled_apps: - firstrunwizard - sharebymail -nextcloud__enabled_apps: - - encryption +nextcloud__enabled_apps: [] +# - encryption nextcloud__php_fpm_settings: # PHP @@ -61,7 +64,10 @@ nextcloud__php_settings: value: 1 - section: PHP option: memory_limit - value: 513M + value: 8192M + - section: PHP + option: zend_extension + value: opcache.so # opcache - section: opcache option: opcache.enable @@ -71,7 +77,7 @@ nextcloud__php_settings: value: 1 - section: opcache option: opcache.memory_consumption - value: 512 + value: 4096 - section: opcache option: opcache.interned_strings_buffer value: 8 diff --git a/roles/nextcloud/occ.yml b/roles/nextcloud/occ.yml index 04c9539..c881d30 100644 --- a/roles/nextcloud/occ.yml +++ b/roles/nextcloud/occ.yml @@ -3,7 +3,7 @@ - name: maintenance:install nextcloud ansible.builtin.command: argv: - - php + - "{{ nextcloud__php_bin }}" - occ - maintenance:install - --database=pgsql @@ -26,13 +26,13 @@ - name: set system settings ansible.builtin.command: - cmd: "php occ config:system:set {{ item.option }} {{ item.value }}" + cmd: "{{ nextcloud__php_bin }} occ config:system:set {{ item.option }} {{ item.value }}" chdir: "{{ httpd_pre__chroot_dir }}/nextcloud" loop: "{{ nextcloud__occ_system_settings }}" - name: disable applications ansible.builtin.command: - cmd: "php occ app:enable {{ item }}" + cmd: "{{ nextcloud__php_bin }} occ app:enable {{ item }}" chdir: "{{ httpd_pre__chroot_dir }}/nextcloud" loop: "{{ nextcloud__disabled_apps }}" register: nextcloud__result_disable_applications @@ -41,25 +41,25 @@ - name: enable applications ansible.builtin.command: - cmd: "php occ app:enable {{ item }}" + cmd: "{{ nextcloud__php_bin }} occ app:enable {{ item }}" chdir: "{{ httpd_pre__chroot_dir }}/nextcloud" loop: "{{ nextcloud__enabled_apps }}" register: nextcloud__result_enable_applications changed_when: - "'already enabled' not in nextcloud__result_enable_applications.stdout" -- name: enable encryption - ansible.builtin.command: - cmd: php occ encryption:enable - chdir: "{{ httpd_pre__chroot_dir }}/nextcloud" - register: nextcloud__result_enable_encryption - changed_when: - - "'already enabled' not in nextcloud__result_enable_encryption.stdout" +# - name: enable encryption +# ansible.builtin.command: +# cmd: "{{ nextcloud__php_bin }} occ encryption:enable" +# chdir: "{{ httpd_pre__chroot_dir }}/nextcloud" +# register: nextcloud__result_enable_encryption +# changed_when: +# - "'already enabled' not in nextcloud__result_enable_encryption.stdout" - name: create application users ansible.builtin.command: argv: - - php + - "{{ nextcloud__php_bin }}" - occ - user:add - --password-from-env diff --git a/roles/nextcloud/tasks/main.yml b/roles/nextcloud/tasks/main.yml index 2a1a0bc..9f84fdf 100644 --- a/roles/nextcloud/tasks/main.yml +++ b/roles/nextcloud/tasks/main.yml @@ -46,7 +46,7 @@ - name: import php tasks ansible.builtin.import_tasks: - file: database.yml + file: php.yml - name: import database tasks ansible.builtin.import_tasks: @@ -69,7 +69,6 @@ job: "php -f {{ nextcloud__chroot_dir }}/cron.php" user: "{{ httpd_pre__user }}" - - name: start and enable php-fpm service ansible.builtin.service: name: "{{ nextcloud__php_service_name }}" -- cgit v1.2.3