From 72362347c21b67bde0f719f2fdf45b62bff01a20 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sep 20 2022 16:04:47 +0000 Subject: Wiki: Manage maximum upload size Signed-off-by: Georg Pfuetzenreuter --- diff --git a/pillar/role/wiki.sls b/pillar/role/wiki.sls index 494ca1d..808b769 100644 --- a/pillar/role/wiki.sls +++ b/pillar/role/wiki.sls @@ -19,6 +19,7 @@ mediawiki: default_version: '1_37' elasticsearch_server: water4.infra.opensuse.org mysql_server: 192.168.47.4:3307 + max_upload_size: 10M # poo#111096 wikis: # availale options: # bento_lang: en diff --git a/salt/profile/wiki/apache.sls b/salt/profile/wiki/apache.sls index 8766fa3..cfd036d 100644 --- a/salt/profile/wiki/apache.sls +++ b/salt/profile/wiki/apache.sls @@ -31,3 +31,11 @@ apache2_running: # removing the file on newer Leap versions to avoid errors in logrotate (duplicate entry...) /etc/logrotate.d/apache2-wiki: file.absent + +# Should we move to PHP-FPM in the future, it would make sense to remove this in favour of a wiki.php profile +/etc/php7/conf.d/salt.ini: + file.managed: + - context: + max_upload_size: {{ pillar['mediawiki']['max_upload_size'] }} + - source: salt://profile/wiki/files/salt.ini + - template: jinja diff --git a/salt/profile/wiki/files/salt.ini b/salt/profile/wiki/files/salt.ini new file mode 100644 index 0000000..6e34f8a --- /dev/null +++ b/salt/profile/wiki/files/salt.ini @@ -0,0 +1,2 @@ +; overrides managed by Salt +upload_max_filesize = {{ max_upload_size }}