diff --git a/CHANGELOG.md b/CHANGELOG.md index f8f7a62..ba2befe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ cookbook-rb-proxy CHANGELOG =============== +## 3.2.1 + + - JuanSheba + - [01ff98d] Add config to create the file with the template + - [84462e7] Create template + ## 3.2.0 - Miguel Negrón diff --git a/resources/metadata.rb b/resources/metadata.rb index 951fbb1..447b6ec 100644 --- a/resources/metadata.rb +++ b/resources/metadata.rb @@ -3,7 +3,7 @@ maintainer_email 'git@redborder.com' license 'AGPL-3.0' description 'Installs/Configures redborder proxy' -version '3.2.0' +version '3.2.1' depends 'rb-common' depends 'rb-selinux' diff --git a/resources/recipes/prepare_system.rb b/resources/recipes/prepare_system.rb index 5850181..7fc9253 100644 --- a/resources/recipes/prepare_system.rb +++ b/resources/recipes/prepare_system.rb @@ -34,6 +34,14 @@ ) end +template '/etc/logrotate.d/logstash' do + source 'logstash_log-rotate.erb' + owner 'root' + group 'root' + mode 0644 + retries 2 +end + service 'chef-client' do if node['redborder']['services']['chef-client'] action [:enable, :start] diff --git a/resources/templates/default/logstash_log-rotate.erb b/resources/templates/default/logstash_log-rotate.erb new file mode 100644 index 0000000..02e6903 --- /dev/null +++ b/resources/templates/default/logstash_log-rotate.erb @@ -0,0 +1,16 @@ +############################################################################### +# Generated by Chef # +############################################################################### + +/var/log/logstash/*.log { + size=20M + missingok + rotate 5 + compress + delaycompress + notifempty + copytruncate + postrotate + rm -f /var/log/logstash/*.gz > /dev/null + endscript +}