added ability to set trashbin_retention_obligation and versions_retention_obligation in config.php

This commit is contained in:
Rikard Danielsson 2024-12-17 08:47:33 +01:00
parent 8e5e7fe34f
commit 501ca8edfb
Signed by untrusted user: richir
GPG key ID: 584D2AA2FA669135
2 changed files with 11 additions and 0 deletions

View file

@ -88,9 +88,14 @@ define sunetdrive::app_type (
$drive_email_template_text_left = $config['drive_email_template_text_left']
$drive_email_template_plain_text_left = $config['drive_email_template_plain_text_left']
$drive_email_template_url_left = $config['drive_email_template_url_left']
$full_backup_retention = hiera('full_backup_retention')
$lb_servers = hiera_hash($environment)['lb_servers']
$document_servers = hiera_hash($environment)['document_servers']
# Calculate some values
$expiration_days_min = $full_backup_retention * 31
$expiration_days_max = $full_backup_retention * 31 + 93
unless $is_multinode{
user { 'www-data': ensure => present, system => true }

View file

@ -192,6 +192,9 @@ $CONFIG = array (
'secret' => '<%= @secret %>',
'skeletondirectory' => '<%= @skeletondirectory %>',
'templatedirectory' => '',
<% if @environment == 'test' -%>
'trashbin_retention_obligation' => 'auto, 30',
<% end -%>
'trusted_domains' =>
array (
<%- index = 0 -%>
@ -234,4 +237,7 @@ $CONFIG = array (
),
'updatechecker' => false,
'version' => '<%= @nextcloud_version_string %>',
<% if @environment == 'test' -%>
'versions_retention_obligation' => '<%= @expiration_days_min %>,<%= @expiration_days_max %>',
<% end -%>
);