From: Matt Birkholz Date: Thu, 20 Nov 2025 22:51:09 +0000 (-0700) Subject: Quiet Nextcloud. Include imagemagick (SVG support), more settings. X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a5e826ea6b2f203649f4892d99d134488da227ea;p=Institute Quiet Nextcloud. Include imagemagick (SVG support), more settings. Eliminate some complaints in the Administration Overview page. --- diff --git a/README.org b/README.org index 7ba676e..59f487c 100644 --- a/README.org +++ b/README.org @@ -1000,7 +1000,7 @@ final configuration "in position" (on a frontier). : $ sudo apt install mariadb-server php php-{apcu,bcmath,curl,gd,gmp}\ : _ php-{json,mysql,mbstring,intl,imagick,xml,zip} \ -: _ libapache2-mod-php +: _ imagemagick libapache2-mod-php Similarly, the NAGIOS configuration required a handful of packages that were pre-loaded via cable modem (to test a frontier deployment). @@ -4126,7 +4126,7 @@ installing a cron job. pkg: [ apache2, mariadb-server, php, php-apcu, php-bcmath, php-curl, php-gd, php-gmp, php-json, php-mysql, php-mbstring, php-intl, php-imagick, php-xml, php-zip, - libapache2-mod-php ] + imagemagick, libapache2-mod-php ] #+END_SRC Next, a number of Apache2 modules are enabled. @@ -4638,17 +4638,41 @@ a complaint on the Settings > Administration > Overview web page. nextcloud_region: US #+END_SRC +It sets Nextcloud's "maintenance window" to start at 02:00MST +(09:00UTC). The interval is 4 hours, so ends at 06:00MST. The +documentation for the setting was found [[https://docs.nextcloud.com/server/31/admin_manual/configuration_server/background_jobs_configuration.html][here]]. + +It also configures Nextcloud to send email with =/usr/sbin/sendmail= +~From: webmaster@core.small.private~. The documentation for the +settings was found [[https://docs.nextcloud.com/server/31/admin_manual/configuration_server/email_configuration.html][here]] though just two parameters are set here, not +the 9 suggested in sub-sub-subsection "Sendmail", of sub-subsection +"Setting mail server parameters in config.php", seemed a simple, +unedited copy of the parameters SMTP and /not/ by Sendmail nor Qmail. + #+CAPTION: [[file:roles_t/core/tasks/main.yml][=roles_t/core/tasks/main.yml=]] #+BEGIN_SRC conf :tangle roles_t/core/tasks/main.yml -- name: Configure Nextcloud phone region. +- name: Configure Nextcloud settings. become: yes lineinfile: path: /var/www/nextcloud/config/config.php - regexp: "^ *'default_phone_region' *=> *'.*', *$" - line: " 'default_phone_region' => '{{ nextcloud_region }}'," insertbefore: "^[)];" firstmatch: yes + loop: + - regexp: "^ *'default_phone_region' *=> *'.*', *$" + line: " 'default_phone_region' => '{{ nextcloud_phone_reg }}'," + + - regexp: "^ *'maintenance_window_start' *=> " + line: " 'maintenance_window_start' => 9," + + - regexp: "^ *'mail_smtpmode' *=>" + line: " 'mail_smtpmode' => 'sendmail'," + - regexp: "^ *'mail_sendmailmode' *=>" + - line: " 'mail_sendmailmode' => 'pipe'," + - regexp: "^ *'mail_from_address' *=>" + - line: " 'mail_from_address' => 'webmaster'," + - regexp: "^ *'mail_domain' *=>" + - line: "^ *'mail_domain' => 'core.small.private'," when: nextcloud.stat.exists #+END_SRC @@ -7278,7 +7302,7 @@ sudo apt install wireguard systemd-resolved unattended-upgrades \ dovecot-imapd fetchmail rsync gnupg \ mariadb-server php php-{apcu,bcmath,curl,gd,gmp}\ php-{json,mysql,mbstring,intl,imagick,xml,zip} \ - libapache2-mod-php \ + imagemagick libapache2-mod-php \ nagios4 monitoring-plugins-basic lm-sensors \ nagios-nrpe-plugin #+END_SRC diff --git a/private/test-core-prep b/private/test-core-prep index 53af72b..8e3d804 100755 --- a/private/test-core-prep +++ b/private/test-core-prep @@ -5,7 +5,7 @@ sudo apt install wireguard systemd-resolved unattended-upgrades \ dovecot-imapd fetchmail rsync gnupg \ mariadb-server php php-{apcu,bcmath,curl,gd,gmp}\ php-{json,mysql,mbstring,intl,imagick,xml,zip} \ - libapache2-mod-php \ + imagemagick libapache2-mod-php \ nagios4 monitoring-plugins-basic lm-sensors \ nagios-nrpe-plugin diff --git a/roles_t/core/tasks/main.yml b/roles_t/core/tasks/main.yml index da87204..65fb66e 100644 --- a/roles_t/core/tasks/main.yml +++ b/roles_t/core/tasks/main.yml @@ -737,7 +737,7 @@ pkg: [ apache2, mariadb-server, php, php-apcu, php-bcmath, php-curl, php-gd, php-gmp, php-json, php-mysql, php-mbstring, php-intl, php-imagick, php-xml, php-zip, - libapache2-mod-php ] + imagemagick, libapache2-mod-php ] - name: Enable Apache2 modules for Nextcloud. become: yes @@ -873,14 +873,27 @@ line: " 'htaccess.RewriteBase' => '/nextcloud'," when: nextcloud.stat.exists -- name: Configure Nextcloud phone region. +- name: Configure Nextcloud settings. become: yes lineinfile: path: /var/www/nextcloud/config/config.php - regexp: "^ *'default_phone_region' *=> *'.*', *$" - line: " 'default_phone_region' => '{{ nextcloud_region }}'," insertbefore: "^[)];" firstmatch: yes + loop: + - regexp: "^ *'default_phone_region' *=> *'.*', *$" + line: " 'default_phone_region' => '{{ nextcloud_phone_reg }}'," + + - regexp: "^ *'maintenance_window_start' *=> " + line: " 'maintenance_window_start' => 9," + + - regexp: "^ *'mail_smtpmode' *=>" + line: " 'mail_smtpmode' => 'sendmail'," + - regexp: "^ *'mail_sendmailmode' *=>" + - line: " 'mail_sendmailmode' => 'pipe'," + - regexp: "^ *'mail_from_address' *=>" + - line: " 'mail_from_address' => 'webmaster'," + - regexp: "^ *'mail_domain' *=>" + - line: "^ *'mail_domain' => 'core.small.private'," when: nextcloud.stat.exists - name: Create /Nextcloud/dbbackup.cnf.