Pass vhost_name into the vhost resource

In order to address scoping issues with $vhost_name in the vhost
template, pass the value from the outer module into the httpd::vhost
resource so that the erb @vhost_name construct will find it.

Change-Id: I79f75fa34c2e277ed4e0bf6929bf5b1628dd8185
This commit is contained in:
Jeremy Stanley 2017-07-12 21:47:04 +00:00
parent 6f726c3088
commit 93505ed3c8
1 changed files with 6 additions and 5 deletions

View File

@ -135,11 +135,12 @@ class ptgbot(
}
::httpd::vhost { $vhost_name:
port => 80,
docroot => '/var/lib/ptgbot/www',
priority => '50',
template => 'ptgbot/vhost.erb',
require => File['/var/lib/ptgbot/www'],
port => 80,
docroot => '/var/lib/ptgbot/www',
priority => '50',
template => 'ptgbot/vhost.erb',
require => File['/var/lib/ptgbot/www'],
vhost_name => $vhost_name,
}
}