Skip to content

Commit

Permalink
Sets 30 day retention period for apache logs
Browse files Browse the repository at this point in the history
  • Loading branch information
starchy committed Aug 16, 2018
1 parent 65f7b3f commit 0bc7c3a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ docker-build-ubuntu: ## Builds SD Ubuntu docker container

.PHONY: build-debs
build-debs: ## Builds and tests debian packages
@if [[ "${CIRCLE_BRANCH}" != docs-* ]]; then molecule test -s builder; else echo Not running on docs branch...; fi
@if [[ "${CIRCLE_BRANCH}" != docs-* ]]; then molecule --debug test -s builder; else echo Not running on docs branch...; fi

.PHONY: safety
safety: ## Runs `safety check` to check python dependencies for vulnerabilities
Expand Down
10 changes: 10 additions & 0 deletions install_files/ansible-base/roles/app/files/apache2-logrotate.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/var/log/apache2/*.log {
daily
missingok
rotate 30
create 640 root adm
sharedscripts
postrotate
/usr/bin/killall -HUP apache2
endscript
}
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,12 @@
- restart apache2
tags:
- apache

- name: Retain no more than one month of apache logs
copy:
src: apache2-logrotate.conf
dest: /etc/logrotate.d/apache2
owner: root
mode: "0644"
tags:
- apache

0 comments on commit 0bc7c3a

Please sign in to comment.