claranet / puppet-consul_template

A Puppet module to manage the config and jobs of Consul Template from Hashicorp
Apache License 2.0
30 stars 89 forks source link

Logrotation should be defined #50

Closed mrh666 closed 8 years ago

mrh666 commented 8 years ago

Hi gdhbashton,

I figured out that debug level generates about 20Mb logs daily which is a lot... So I defined logrotation for module, please check my 3 pull requests (tested, working)

gdhbashton commented 8 years ago

Hi,

Apologies for a long delay on replying here - can you make the logrotate an optional feature?

e.g. I notice that the postrotate command is /sbin/service which is classically CentOS/RHEL6 - I'm trying to keep the module open for CentOS/RHEL7 as well as Debian / Ubuntu.

mrh666 commented 8 years ago

gdhbashton, of course! I wrote it as an option in first place: $logrotate_on should be "true" to turn it on. And by default it's "false".

About service/systemctl command you are right. I defined case for SysV/Systemd for Centos/Rhel/Scientific/Oracle 6,7 and Amazon Linux. I tested it on Centos 6/7 and Amazon, I just don't have any other OSs in our environment. Changes in pull request applied.

gdhbashton commented 8 years ago

CentOS is good enough for me right now - and thanks for pointing out the default false - so no breakage should occur.

That's merged to master now - thank you :)