Skip to content

Commit

Permalink
Set reverse proxy servername via certs
Browse files Browse the repository at this point in the history
The certs class already has the correct servername (set via init.pp) so
this avoids a mismatch. It also adds aliases via the CNAME, which is new
functionality.
  • Loading branch information
ekohl committed Oct 18, 2020
1 parent ffce1cf commit 965f2b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@
~> class { 'foreman_proxy_content::reverse_proxy':
path => '/',
url => "${foreman_url}/",
servername => $foreman_proxy_fqdn,
port => $reverse_proxy_port,
subscribe => Class['certs::foreman_proxy'],
ssl_protocol => $ssl_protocol,
Expand Down
6 changes: 2 additions & 4 deletions manifests/reverse_proxy.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
# The path where to mount the reverse proxy
# @param url
# The URL to forward to
# @param servername
# The Apache vhost server name to listen on
# @param port
# The port to listen on
# @param ssl_protocol
Expand All @@ -17,7 +15,6 @@
class foreman_proxy_content::reverse_proxy (
Stdlib::Unixpath $path = '/',
Stdlib::Httpurl $url = "${foreman_proxy_content::foreman_url}/",
Stdlib::Fqdn $servername = $foreman_proxy_content::foreman_proxy_fqdn,
Stdlib::Port $port = $foreman_proxy_content::reverse_proxy_port,
Variant[Array[String], String, Undef] $ssl_protocol = undef,
Hash[String, Any] $vhost_params = {},
Expand All @@ -30,7 +27,8 @@
Class['certs', 'certs::ca', 'certs::apache', 'certs::foreman_proxy'] ~> Class['apache::service']

apache::vhost { 'katello-reverse-proxy':
servername => $servername,
servername => $certs::apache::hostname,
aliases => $certs::apache::cname,
port => $port,
docroot => '/var/www/',
priority => '28',
Expand Down

0 comments on commit 965f2b3

Please sign in to comment.