diff --git a/defaults/main/ood_portal.yml b/defaults/main/ood_portal.yml index 89f8d06..8f89d9e 100644 --- a/defaults/main/ood_portal.yml +++ b/defaults/main/ood_portal.yml @@ -27,6 +27,7 @@ use_maintenance: true servername: localhost # proxy_server: httpd_port: 80 +server_aliases: [] # ssl_cert: "/etc/pki/tls/certs/www.example.com.crt" # ssl_cert_key: "/etc/pki/tls/certs/www.example.com.key" diff --git a/molecule/default/fixtures/config/ood_portal.yml.custom.apache2 b/molecule/default/fixtures/config/ood_portal.yml.custom.apache2 index 3e98cd7..863241e 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.custom.apache2 +++ b/molecule/default/fixtures/config/ood_portal.yml.custom.apache2 @@ -16,6 +16,12 @@ # Default: null (don't use name-based Virtual Host) servername: localhost +# The server aliases used for the name-based Virtual Host +# Example: +# server_aliases: +# - foo.example.com +#server_aliases: [] + # The server name used for rewrites # Example: # proxy_server: 'proxy.example.com' diff --git a/molecule/default/fixtures/config/ood_portal.yml.custom.httpd b/molecule/default/fixtures/config/ood_portal.yml.custom.httpd index c5100a3..0c0c73a 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.custom.httpd +++ b/molecule/default/fixtures/config/ood_portal.yml.custom.httpd @@ -16,6 +16,12 @@ # Default: null (don't use name-based Virtual Host) servername: localhost +# The server aliases used for the name-based Virtual Host +# Example: +# server_aliases: +# - foo.example.com +#server_aliases: [] + # The server name used for rewrites # Example: # proxy_server: 'proxy.example.com' 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 4cf5e77..6ab5dca 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.custom.httpd24-httpd +++ b/molecule/default/fixtures/config/ood_portal.yml.custom.httpd24-httpd @@ -16,6 +16,12 @@ # Default: null (don't use name-based Virtual Host) servername: localhost +# The server aliases used for the name-based Virtual Host +# Example: +# server_aliases: +# - foo.example.com +#server_aliases: [] + # The server name used for rewrites # Example: # proxy_server: 'proxy.example.com' diff --git a/molecule/default/fixtures/config/ood_portal.yml.default.apache2 b/molecule/default/fixtures/config/ood_portal.yml.default.apache2 index d5c0368..308db5b 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.default.apache2 +++ b/molecule/default/fixtures/config/ood_portal.yml.default.apache2 @@ -16,6 +16,12 @@ # Default: null (don't use name-based Virtual Host) servername: localhost +# The server aliases used for the name-based Virtual Host +# Example: +# server_aliases: +# - foo.example.com +#server_aliases: [] + # The server name used for rewrites # Example: # proxy_server: 'proxy.example.com' diff --git a/molecule/default/fixtures/config/ood_portal.yml.default.httpd b/molecule/default/fixtures/config/ood_portal.yml.default.httpd index 27190aa..17f4531 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.default.httpd +++ b/molecule/default/fixtures/config/ood_portal.yml.default.httpd @@ -16,6 +16,12 @@ # Default: null (don't use name-based Virtual Host) servername: localhost +# The server aliases used for the name-based Virtual Host +# Example: +# server_aliases: +# - foo.example.com +#server_aliases: [] + # The server name used for rewrites # Example: # proxy_server: 'proxy.example.com' diff --git a/molecule/default/fixtures/config/ood_portal.yml.default.httpd24-httpd b/molecule/default/fixtures/config/ood_portal.yml.default.httpd24-httpd index 2d1b425..0779f22 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.default.httpd24-httpd +++ b/molecule/default/fixtures/config/ood_portal.yml.default.httpd24-httpd @@ -16,6 +16,12 @@ # Default: null (don't use name-based Virtual Host) servername: localhost +# The server aliases used for the name-based Virtual Host +# Example: +# server_aliases: +# - foo.example.com +#server_aliases: [] + # The server name used for rewrites # Example: # proxy_server: 'proxy.example.com' diff --git a/molecule/default/fixtures/config/ood_portal.yml.oidc.apache2 b/molecule/default/fixtures/config/ood_portal.yml.oidc.apache2 index c88138f..6c54ad9 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.oidc.apache2 +++ b/molecule/default/fixtures/config/ood_portal.yml.oidc.apache2 @@ -16,6 +16,12 @@ # Default: null (don't use name-based Virtual Host) servername: localhost +# The server aliases used for the name-based Virtual Host +# Example: +# server_aliases: +# - foo.example.com +#server_aliases: [] + # The server name used for rewrites # Example: # proxy_server: 'proxy.example.com' diff --git a/molecule/default/fixtures/config/ood_portal.yml.oidc.httpd b/molecule/default/fixtures/config/ood_portal.yml.oidc.httpd index abd0d23..5d56ac2 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.oidc.httpd +++ b/molecule/default/fixtures/config/ood_portal.yml.oidc.httpd @@ -16,6 +16,12 @@ # Default: null (don't use name-based Virtual Host) servername: localhost +# The server aliases used for the name-based Virtual Host +# Example: +# server_aliases: +# - foo.example.com +#server_aliases: [] + # The server name used for rewrites # Example: # proxy_server: 'proxy.example.com' diff --git a/molecule/default/fixtures/config/ood_portal.yml.oidc.httpd24-httpd b/molecule/default/fixtures/config/ood_portal.yml.oidc.httpd24-httpd index 05cc263..7846d7a 100644 --- a/molecule/default/fixtures/config/ood_portal.yml.oidc.httpd24-httpd +++ b/molecule/default/fixtures/config/ood_portal.yml.oidc.httpd24-httpd @@ -16,6 +16,12 @@ # Default: null (don't use name-based Virtual Host) servername: localhost +# The server aliases used for the name-based Virtual Host +# Example: +# server_aliases: +# - foo.example.com +#server_aliases: [] + # The server name used for rewrites # Example: # proxy_server: 'proxy.example.com' diff --git a/templates/ood_portal.yml.j2 b/templates/ood_portal.yml.j2 index 8927b32..6bbfde4 100644 --- a/templates/ood_portal.yml.j2 +++ b/templates/ood_portal.yml.j2 @@ -20,6 +20,19 @@ {% else %}#servername: null {% endif %} +# The server aliases used for the name-based Virtual Host +# Example: +# server_aliases: +# - foo.example.com +{% if server_aliases is defined and server_aliases|length > 0 %} +server_aliases: +{% for item in maintenance_ip_allowlist %} + - '{{ item }}' +{% endfor %} +{% else %} +#server_aliases: [] +{% endif %} + # The server name used for rewrites # Example: # proxy_server: 'proxy.example.com'