Multinode: Double book keeping
Unfortunatly we must do the same calcultions for multinode
This commit is contained in:
parent
dc59842fe8
commit
5b68f26771
3 changed files with 5 additions and 3 deletions
|
@ -18,7 +18,6 @@ define sunetdrive::app_type (
|
||||||
$dbhost = $config[ 'dbhost' ]
|
$dbhost = $config[ 'dbhost' ]
|
||||||
$dbname = $config[ 'dbname' ]
|
$dbname = $config[ 'dbname' ]
|
||||||
$dbuser = $config[ 'dbuser' ]
|
$dbuser = $config[ 'dbuser' ]
|
||||||
$full_backup_retention = $config[ 'full_backup_retention' ]
|
|
||||||
$instanceid = $config[ 'instanceid' ]
|
$instanceid = $config[ 'instanceid' ]
|
||||||
$mysql_user_password = $config[ 'mysql_user_password' ]
|
$mysql_user_password = $config[ 'mysql_user_password' ]
|
||||||
$passwordsalt = $config[ 'passwordsalt' ]
|
$passwordsalt = $config[ 'passwordsalt' ]
|
||||||
|
|
|
@ -296,6 +296,10 @@ MACAddressPolicy=none'
|
||||||
} else {
|
} else {
|
||||||
$full_backup_retention = hiera('full_backup_retention')
|
$full_backup_retention = hiera('full_backup_retention')
|
||||||
}
|
}
|
||||||
|
# Calculate some values
|
||||||
|
$expiration_months = max(12, $full_backup_retention)
|
||||||
|
$expiration_days_min = $expiration_months * 31
|
||||||
|
$expiration_days_max = $expiration_months * 31 + 93
|
||||||
|
|
||||||
# Secrets from local.eyaml
|
# Secrets from local.eyaml
|
||||||
$admin_password = safe_hiera("${customer}_admin_password")
|
$admin_password = safe_hiera("${customer}_admin_password")
|
||||||
|
@ -320,7 +324,6 @@ MACAddressPolicy=none'
|
||||||
drive_email_template_plain_text_left => hiera($environment)['drive_email_template_plain_text_left'],
|
drive_email_template_plain_text_left => hiera($environment)['drive_email_template_plain_text_left'],
|
||||||
drive_email_template_text_left => hiera($environment)['drive_email_template_text_left'],
|
drive_email_template_text_left => hiera($environment)['drive_email_template_text_left'],
|
||||||
drive_email_template_url_left => hiera($environment)['drive_email_template_url_left'],
|
drive_email_template_url_left => hiera($environment)['drive_email_template_url_left'],
|
||||||
full_backup_retention => $full_backup_retention,
|
|
||||||
mariadb_dir => "/opt/multinode/${customer}/mariadb-${customer}",
|
mariadb_dir => "/opt/multinode/${customer}/mariadb-${customer}",
|
||||||
mycnf_path => 'sunetdrive/multinode/my.cnf.erb',
|
mycnf_path => 'sunetdrive/multinode/my.cnf.erb',
|
||||||
mysql_root_password => $mysql_root_password,
|
mysql_root_password => $mysql_root_password,
|
||||||
|
|
|
@ -238,6 +238,6 @@ $CONFIG = array (
|
||||||
'updatechecker' => false,
|
'updatechecker' => false,
|
||||||
'version' => '<%= @nextcloud_version_string %>',
|
'version' => '<%= @nextcloud_version_string %>',
|
||||||
<% if @environment == 'test' -%>
|
<% if @environment == 'test' -%>
|
||||||
'versions_retention_obligation' => '<%= @expiration_days_min %>,<%= @expiration_days_max %>',
|
'versions_retention_obligation' => '<%= @expiration_days_min %>, <%= @expiration_days_max %>',
|
||||||
<% end -%>
|
<% end -%>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue