From 370a733908f5b6561d365745d4c3b7365f6650a6 Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Wed, 7 Jun 2023 16:55:51 -0400 Subject: [PATCH] correctly use server_aliases and update tests (#192) --- molecule/default/fixtures/config/ood_portal.yml.custom.apache2 | 3 ++- molecule/default/fixtures/config/ood_portal.yml.custom.httpd | 3 ++- .../fixtures/config/ood_portal.yml.custom.httpd24-httpd | 3 ++- molecule/default/vars/portal.yml | 3 +++ templates/ood_portal.yml.j2 | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/molecule/default/fixtures/config/ood_portal.yml.custom.apache2 b/molecule/default/fixtures/config/ood_portal.yml.custom.apache2 index 863241e..572a9b9 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.custom.apache2 +++ b/molecule/default/fixtures/config/ood_portal.yml.custom.apache2 @@ -20,7 +20,8 @@ servername: localhost # Example: # server_aliases: # - foo.example.com -#server_aliases: [] +server_aliases: + - 'other-site.notrealdoman.edu' # The server name used for rewrites # Example: diff --git a/molecule/default/fixtures/config/ood_portal.yml.custom.httpd b/molecule/default/fixtures/config/ood_portal.yml.custom.httpd index 0c0c73a..df4eeb1 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.custom.httpd +++ b/molecule/default/fixtures/config/ood_portal.yml.custom.httpd @@ -20,7 +20,8 @@ servername: localhost # Example: # server_aliases: # - foo.example.com -#server_aliases: [] +server_aliases: + - 'other-site.notrealdoman.edu' # The server name used for rewrites # Example: diff --git a/molecule/default/fixtures/config/ood_portal.yml.custom.httpd24-httpd b/molecule/default/fixtures/config/ood_portal.yml.custom.httpd24-httpd index 6ab5dca..b349e6f 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.custom.httpd24-httpd +++ b/molecule/default/fixtures/config/ood_portal.yml.custom.httpd24-httpd @@ -20,7 +20,8 @@ servername: localhost # Example: # server_aliases: # - foo.example.com -#server_aliases: [] +server_aliases: + - 'other-site.notrealdoman.edu' # The server name used for rewrites # Example: diff --git a/molecule/default/vars/portal.yml b/molecule/default/vars/portal.yml index 64a9368..f7d37a9 100644 --- a/molecule/default/vars/portal.yml +++ b/molecule/default/vars/portal.yml @@ -14,6 +14,9 @@ security_strict_transport: true pun_pre_hook_exports: 'OIDC_ACCESS_TOKEN,OIDC_CLAIM_EMAIL' pun_pre_hook_root_cmd: '/opt/site/site_pre_hook' +server_aliases: + - other-site.notrealdoman.edu + ood_auth_openidc: OIDCSessionMaxDuration: 28888 OIDCClientID: myid diff --git a/templates/ood_portal.yml.j2 b/templates/ood_portal.yml.j2 index 6bbfde4..22566ea 100644 --- a/templates/ood_portal.yml.j2 +++ b/templates/ood_portal.yml.j2 @@ -26,7 +26,7 @@ # - foo.example.com {% if server_aliases is defined and server_aliases|length > 0 %} server_aliases: -{% for item in maintenance_ip_allowlist %} +{% for item in server_aliases %} - '{{ item }}' {% endfor %} {% else %}