diff --git a/manifests/app_type.pp b/manifests/app_type.pp index 5e8f6a2..3ef7a6c 100644 --- a/manifests/app_type.pp +++ b/manifests/app_type.pp @@ -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 } diff --git a/templates/application/config.php.erb b/templates/application/config.php.erb index ec36ad8..23080bc 100644 --- a/templates/application/config.php.erb +++ b/templates/application/config.php.erb @@ -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 -%> );