Skip to content

Commit

Permalink
moved accesslog for test
Browse files Browse the repository at this point in the history
  • Loading branch information
djentangle committed Aug 1, 2024
1 parent 2320849 commit 00c6e1e
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions test/cookbooks/openldap-test/recipes/accesslog.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
ldap_dir =
case os.family
when 'debian'
'/etc/ldap'
when 'redhat', 'amazon', 'fedora', 'suse'
'/etc/openldap'
when 'bsd'
'/usr/local/etc/openldap'
end

node.default['openldap']['accesslog']['enabled'] = true
node.default['openldap']['accesslog']['logdb'] = '"cn=accesslog"'
node.default['openldap']['accesslog']['directory'] = '/var/lib/ldap/accesslog'
node.default['openldap']['accesslog']['directory'] = '#{ldap_dir}/accesslog'
node.default['openldap']['accesslog']['index'] = 'reqStart,reqEnd,reqResult eq'
node.default['openldap']['accesslog']['logops'] = 'writes'
node.default['openldap']['accesslog']['logold'] = '(objectclass=*)'
node.default['openldap']['accesslog']['logpurge'] = '8+00:00 1+00:00'

node.default['openldap']['modules'] << 'accesslog'

directories = ['/var/lib/ldap', '/var/lib/ldap/accesslog']

directories.each do |dir|
directory dir do
directory '#{ldap_dir}/accesslog' do
mode '0755'
owner 'root'
group 'root'
Expand Down

0 comments on commit 00c6e1e

Please sign in to comment.