Skip to content

Commit

Permalink
rename LDAP include fragment file extension so it doesn't get include…
Browse files Browse the repository at this point in the history
…d into the default VHost by puppetlabs-apache's include of all *.conf files
  • Loading branch information
lukebigum committed Oct 11, 2019
1 parent 48fc87a commit d2eacea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
9 changes: 5 additions & 4 deletions manifests/apache/vhost.pp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
# No default ($::puppetboard::params::ldap_url)
#
# [*ldap_bind_authoritative]
# (string) Determines if other authentication providers are used
# (string) Determines if other authentication providers are used
# when a user can be mapped to a DN but the server cannot bind with the credentials
# No default ($::puppetboard::params::ldap_bind_authoritative)
#
Expand Down Expand Up @@ -125,10 +125,11 @@
}

if $enable_ldap_auth {
$ldap_additional_includes = [ "${puppetboard::params::apache_confd}/puppetboard-ldap.conf" ]
$ldap_require = File["${puppetboard::params::apache_confd}/puppetboard-ldap.conf"]
file { "${puppetboard::params::apache_confd}/puppetboard-ldap.conf":
$ldap_additional_includes = [ "${::puppetboard::params::apache_confd}/puppetboard-ldap.part" ]
$ldap_require = File["${::puppetboard::params::apache_confd}/puppetboard-ldap.part"]
file { 'puppetboard-ldap.part':
ensure => present,
path => "${::puppetboard::params::apache_confd}/puppetboard-ldap.part",
owner => 'root',
group => 'root',
content => template('puppetboard/apache/ldap.erb'),
Expand Down
8 changes: 4 additions & 4 deletions spec/classes/vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
describe 'default params' do
let :params do
{
'vhost_name' => 'puppetboard.local',
'port' => 80
'vhost_name' => 'puppetboard.local',
'port' => 80,
'enable_ldap_auth' => true
}
end
let(:pre_condition) do
Expand All @@ -32,9 +33,8 @@
).that_requires('File[/srv/puppetboard/puppetboard/wsgi.py]')
end
it do
is_expected.to contain_concat('25-puppetboard.local.conf').with(
is_expected.to contain_file('puppetboard-ldap.part').with(
'ensure' => 'present',
'path' => '/etc/apache2/sites-available/25-puppetboard.local.conf'
)
end
end
Expand Down

0 comments on commit d2eacea

Please sign in to comment.