From 64d7efb8c0f23d1deff70885bf97b01f5d9afed3 Mon Sep 17 00:00:00 2001 From: Steve Yun Date: Fri, 2 Aug 2024 08:58:47 -0400 Subject: [PATCH] trying something --- .../openldap-test/recipes/accesslog.rb | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/test/cookbooks/openldap-test/recipes/accesslog.rb b/test/cookbooks/openldap-test/recipes/accesslog.rb index c1105c0..a72f757 100644 --- a/test/cookbooks/openldap-test/recipes/accesslog.rb +++ b/test/cookbooks/openldap-test/recipes/accesslog.rb @@ -1,6 +1,6 @@ node.default['openldap']['accesslog']['enabled'] = true node.default['openldap']['accesslog']['logdb'] = '"cn=accesslog"' -node.default['openldap']['accesslog']['directory'] = '/etc/ldap/' +node.default['openldap']['accesslog']['directory'] = '/var/lib/ldap/accesslog' node.default['openldap']['accesslog']['index'] = 'reqStart,reqEnd,reqResult eq' node.default['openldap']['accesslog']['logops'] = 'writes' node.default['openldap']['accesslog']['logold'] = '(objectclass=*)' @@ -8,4 +8,23 @@ node.default['openldap']['modules'] << 'accesslog' +user 'openldap' do + action :create +end + +group 'openldap' do + action :create +end + +directories = ['/var/lib/ldap', '/var/lib/ldap/accesslog'] + +directories.each do |dir| + directory dir do + mode '0755' + owner 'openldap' + group 'openldap' + action :create + end +end + include_recipe 'openldap::default'