Logrotate recipe not setting owner/group
Summary
Converge / Logrotate recipes do not set the owner/group for the logrotate.conf. If incorrectly set it will prevent logrotate from running successfully.
error: Ignoring /var/opt/gitlab/logrotate/logrotate.conf because the file owner is wrong (should be root or user with uid 0).
Proposal
Add owner/group to the logrotate recipe:
template File.join(logrotate_dir, "logrotate.conf") do
mode "0644"
variables(node['gitlab']['logrotate'].to_hash)
end
template File.join(logrotate_dir, "logrotate.conf") do
mode "0644"
owner 'root'
group 'root'
variables(node['gitlab']['logrotate'].to_hash)
end
References
Edited by Davin Walker