Open
Description
Cookbook version
2.3.4
Chef-client version
13.6.4
Platform Details
centos 7.4.1708
Scenario:
The changes detailed at 84c30ce#diff-3145628960d821e12b5cc7c0cb6d1b39 didn't make it into version 2.3.4 released on supermarket at https://supermarket.chef.io/cookbooks/auditd so berks caches version 2.3.4 of the cookbook from supermarket which doesn't have this fix.
Steps to Reproduce:
- Create wrapper cookbook
- add
default['auditd']['ruleset'] = 'cis'
toattributtes/default.rb
- add
include_recipe 'auditd::conf
torecipes/default.rb
- Add
depends 'auditd', '~> 2.3.4'
tometadata.rb
- run
berks install
- configure
.kitchen.yml
to have a centos 7 VM - run
kitchen converge centos-7
Expected Result:
/etc/audit/auditd.conf
is updated when running the auditd::conf
recipe on centos/redhat instead of /etc/audit/cis.auditd
.
Actual Result:
Does not configure /etc/audit/auditd.conf
instead configuring /etc/audit/cis.auditd
Snippet detailing the errant configuration file path
Recipe: auditd::conf
* auditd_conf_file[cis.auditd] action create
* template[/etc/audit/cis.auditd] action create
- create new file /etc/audit/cis.auditd
- update content in file /etc/audit/cis.auditd from none to 64477b
--- /etc/audit/cis.auditd 2019-02-06 20:40:55.410125292 +0000
Reviewing the berkshelf cache:
[[email protected]]$ cat ~/.berkshelf/cookbooks/auditd-2.3.4/resources/conf_file.rb
#
# Cookbook:: auditd
# Resource:: auditd_conf_file
#
# Copyright:: 2018, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
property :cookbook, String
action :create do
extend AuditD::Helper
template auditd_conffile(new_resource.name) do
source "#{new_resource.name}.conf.erb"
cookbook new_resource.cookbook if new_resource.cookbook
notifies :reload, 'service[auditd]'
end
end
Metadata
Metadata
Assignees
Labels
No labels