Skip to content

Commit

Permalink
Merge pull request #257 from lukebigum/apache_ldap
Browse files Browse the repository at this point in the history
rename LDAP include fragment file extension so it doesn't get include…
  • Loading branch information
bastelfreak authored Oct 16, 2019
2 parents 48fc87a + e161836 commit cab997f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 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
10 changes: 5 additions & 5 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(
'ensure' => 'present',
'path' => '/etc/apache2/sites-available/25-puppetboard.local.conf'
is_expected.to contain_file('puppetboard-ldap.part').with(
'ensure' => 'present'
)
end
end
Expand Down

0 comments on commit cab997f

Please sign in to comment.