system-config/modules/openstack_project/templates/survey.vhost.erb
Jeremy Stanley ea66db19f1 Correct auth_openid scope in survey vhost
With the move to Puppet 4, vhost config templates fail to find
relative references to class parameters within a vhost resource
scope. Be explicit about the scope for the auth_openid parameter in
the survey class from within its associated vhost config template so
that it will be correctly found.

Change-Id: I7c769849449b304193e3eb41d129364817d7db1f
2019-01-16 21:49:17 +00:00

54 lines
1.7 KiB
Plaintext

# ************************************
# Managed by Puppet
# ************************************
<VirtualHost <%= @vhost_name %>:80>
ServerName <%= @srvname %>
ReWriteEngine On
ReWriteRule ^/(.*) https://<%= @srvname %>/$1 [last,redirect=permanent]
LogLevel warn
ErrorLog /var/log/apache2/<%= @name %>_error.log
CustomLog /var/log/apache2/<%= @name %>_access.log combined
ServerSignature Off
</VirtualHost>
<VirtualHost <%= @vhost_name %>:<%= @port %>>
ServerName <%= @srvname %>
DocumentRoot <%= @docroot %>
<Directory <%= @docroot %>>
Options <%= @options %>
AllowOverride None
Order allow,deny
allow from all
Require all granted
</Directory>
<% if scope.lookupvar("openstack_project::survey::auth_openid") != nil %>
<Location /index.php/admin/>
AuthType OpenID
AuthName "Welcome"
AuthOpenIDSecureCookie On
AuthOpenIDCookieLifespan 3600
AuthOpenIDTrustRoot https://<%= @srvname %>
AuthOpenIDServerName https://<%= @srvname %>
AuthOpenIDSingleIdP https://openstackid.org
AuthOpenIDTrusted ^https://openstackid.org/.*$
Require valid-user
</Location>
<% end %>
SSLEngine on
SSLProtocol ALL -SSLv2 -SSLv3
SSLCertificateFile <%= scope.lookupvar("openstack_project::survey::ssl_cert_file") %>
SSLCertificateKeyFile <%= scope.lookupvar("openstack_project::survey::ssl_key_file") %>
<% if scope.lookupvar("openstack_project::survey::ssl_chain_file") != "" %>
SSLCertificateChainFile <%= scope.lookupvar("openstack_project::survey::ssl_chain_file") %>
<% end %>
ErrorLog /var/log/apache2/<%= @name %>_error.log
LogLevel warn
CustomLog /var/log/apache2/<%= @name %>_access.log combined
ServerSignature Off
</VirtualHost>