Apparently unable to change global file?
boldandbusted opened this issue · 2 comments
boldandbusted commented
Hi there. I have a recipe with code like so:
include_recipe 'logrotate'
include_recipe 'logrotate::global'
node.set['logrotate']['global']['compress'] = true
%w[ monthly weekly yearly ].each do |freq|
node.set['logrotate']['global'][freq] = false
end
node.set['logrotate']['global']['daily'] = true
node.set['logrotate']['global']['rotate'] = 999
None of these seem to have an effect on the generated logrotate.conf file on the node. :/ Am I doing it wrong? Are there any examples I can see from a working recipe for changing Globals? Thanks in advance.
stevendanna commented
@boldandbusted Try moving the include_recipe
lines to the end of that recipe or try setting your custom values in an attribute file rather than a recipe.
stevendanna commented
@boldandbusted I'm gonna close this one out, please let me know if this is still an issue for you and I will reopen it.