Reorder config

This commit is contained in:
Micke Nordin 2023-06-01 12:37:18 +02:00
parent 3be9fb986d
commit 3daa399b06
Signed by untrusted user: Micke
GPG key ID: 0DA0A7A5708FE257

View file

@ -9,7 +9,13 @@ define sunetdrive::app_type (
$environment = sunetdrive::get_environment() $environment = sunetdrive::get_environment()
$customer = sunetdrive::get_customer() $customer = sunetdrive::get_customer()
$nodenumber = sunetdrive::get_node_number() $nodenumber = sunetdrive::get_node_number()
$is_multinode = (($override_config != undef) and ($override_compose != undef))
if $is_multinode {
$config = $override_config
} else {
$config = hiera_hash($environment)
}
# Common settings for multinode and full nodes # Common settings for multinode and full nodes
$nextcloud_ip = $config['app'] $nextcloud_ip = $config['app']
$s3_bucket = $config['s3_bucket'] $s3_bucket = $config['s3_bucket']
@ -22,10 +28,7 @@ define sunetdrive::app_type (
$gss_jwt_key = safe_hiera('gss_jwt_key') $gss_jwt_key = safe_hiera('gss_jwt_key')
$smtppassword = safe_hiera('smtp_password') $smtppassword = safe_hiera('smtp_password')
$is_multinode = (($override_config != undef) and ($override_compose != undef))
if $is_multinode { if $is_multinode {
# The config used
$config = $override_config
# Other settings # Other settings
$redis_host = $config['redis_host'] $redis_host = $config['redis_host']
$admin_password = $config[ 'admin_password' ] $admin_password = $config[ 'admin_password' ]
@ -42,8 +45,6 @@ define sunetdrive::app_type (
$session_save_handler = 'redis' $session_save_handler = 'redis'
$session_save_path = "tcp://${redis_host}:6379?auth=${redis_host_password}" $session_save_path = "tcp://${redis_host}:6379?auth=${redis_host_password}"
} else { } else {
# The config used
$config = hiera_hash($environment)
$skeletondirectory = $config['skeletondirectory'] $skeletondirectory = $config['skeletondirectory']
# Other settings # Other settings
$redis_seeds = [ $redis_seeds = [