From 472977fde429dd285960f37acea0aa0fdb79729c Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Mon, 20 May 2024 10:44:37 +0200 Subject: [PATCH] Update config for lookup server --- manifests/lookup.pp | 5 +++++ templates/lookup/config.php.erb | 27 ++++++++++++++++++++------- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/manifests/lookup.pp b/manifests/lookup.pp index ccd7b43..88db327 100644 --- a/manifests/lookup.pp +++ b/manifests/lookup.pp @@ -5,6 +5,9 @@ class sunetdrive::lookup ( ) { $environment = sunetdrive::get_environment() + $config = lookup($environment, undef, undef, undef) + + $public_url = "https://${config['site_name']}" # Firewall settings @@ -13,8 +16,10 @@ class sunetdrive::lookup ( $dbhost = 'proxysql_proxysql_1' $gss_jwt_key = safe_hiera('gss_jwt_key') + $replication_auth = safe_hiera('replication_auth') $mysql_user_password = safe_hiera('mysql_user_password') $lookup_version = hiera("lookup_version_${environment}") + $email_sender = $config['email_sender'] #Create users user { 'www-data': ensure => present, system => true } diff --git a/templates/lookup/config.php.erb b/templates/lookup/config.php.erb index ce464dd..c7f9551 100644 --- a/templates/lookup/config.php.erb +++ b/templates/lookup/config.php.erb @@ -1,16 +1,29 @@ - "<%= @gss_jwt_key %>", 'DB' => [ 'host' => "<%= @dbhost %>", 'db' => "lookup" , 'user' => "lookup", 'pass' => "<%= @mysql_user_password %>", ], - + 'EMAIL_SENDER' => '<%= @email_sender %>', + 'ERROR_VERBOSE' => false, 'GLOBAL_SCALE' => true, - - 'AUTH_KEY' => "<%= @gss_jwt_key %>", -]; \ No newline at end of file + 'IP_BLACKLIST' => [ + ], + 'MAX_REQUESTS' => 10000, + 'MAX_SEARCH_PAGE' => 10, + 'PUBLIC_URL' => '<%= @public_url %>', + 'REPLICATION_AUTH' => '<%= @replication_auth %>', + 'REPLICATION_HOSTS' => [ + ], + 'SPAM_BLACKLIST' => [ + ], + 'TWITTER' => [ + 'CONSUMER_KEY' => '', + 'CONSUMER_SECRET' => '', + 'ACCESS_TOKEN' => '', + 'ACCESS_TOKEN_SECRET' => '', + ], +];