Skip to content

Commit

Permalink
MODULES-1696: ensure mod::setenvif is included if needed
Browse files Browse the repository at this point in the history
  • Loading branch information
jlambert121 committed Jan 22, 2015
1 parent dd06847 commit 361ce83
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions manifests/vhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,12 @@
}
}

if ($setenv and ! empty($setenv)) or ($setenvif and ! empty($setenvif)) {
if ! defined(Class['apache::mod::setenvif']) {
include ::apache::mod::setenvif
}
}

## Create a default directory list if none defined
if $directories {
if !is_hash($directories) and !(is_array($directories) and is_hash($directories[0])) {
Expand Down
1 change: 1 addition & 0 deletions spec/defines/vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@
it { is_expected.to contain_class('apache::mod::passenger') }
it { is_expected.to contain_class('apache::mod::fastcgi') }
it { is_expected.to contain_class('apache::mod::headers') }
it { is_expected.to contain_class('apache::mod::setenvif') }
it { is_expected.to contain_concat('30-rspec.example.com.conf').with({
'owner' => 'root',
'mode' => '0644',
Expand Down

0 comments on commit 361ce83

Please sign in to comment.