I found an error in your provided script (missing endscript):
postrotate
rm -rf /var/log/elasticsearch/*.log.$(date +%Y)*
endscript
I believe this part fails and somehow applies global settings for this log pattern.
I found an error in your provided script (missing endscript):
postrotate
rm -rf /var/log/elasticsearch/*.log.$(date +%Y)*
endscript
I believe this part fails and somehow applies global settings for this log pattern.