Skip to content

Instantly share code, notes, and snippets.

@maewolfsky
Created February 12, 2018 22:23
Show Gist options
  • Save maewolfsky/ae5afb057914c36dbd287e75fd68a984 to your computer and use it in GitHub Desktop.
Save maewolfsky/ae5afb057914c36dbd287e75fd68a984 to your computer and use it in GitHub Desktop.
... other stuff that works ...
if node['notifications']['disabled']
Chef::Log.debug('Notifications are disabled on this node.')
return
else
file '/var/lock/subsys/notification' do
owner 'root'
group 'root'
mode '0755'
action :create
end
end
# stuff after this doesn't work
logrotate_files = %w[
app1
app2
]
logrotate_files.each do |file|
cookbook_file "/etc/logrotate.d/#{file}" do
source "logrotate.d/#{file}"
owner 'root'
group 'root'
mode '0644'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment