nginx/server: Fix logs and rotation for CentOS

This commit is contained in:
Timo Makinen 2021-09-17 16:19:31 +00:00
parent b51601515e
commit 855234f77c

View file

@ -35,6 +35,14 @@
group: "{{ ansible_wheel }}"
notify: restart nginx
- name: fix logdir permissions
file:
path: "{{ nginx_logdir }}"
state: directory
mode: 0755
owner: root
group: "{{ ansible_wheel }}"
- name: disable system log rotate
lineinfile:
path: /etc/newsyslog.conf
@ -52,6 +60,7 @@
mode: 0755
owner: root
group: "{{ ansible_wheel }}"
when: ansible_os_family == "OpenBSD"
- name: add logrotate cron job
cron:
@ -59,6 +68,7 @@
hour: "0"
minute: "0"
job: /usr/local/sbin/nginx-logrotate
when: ansible_os_family == "OpenBSD"
- import_role:
name: sftpuser