nginx/server: Fix logs and rotation for CentOS
This commit is contained in:
parent
b51601515e
commit
855234f77c
1 changed files with 10 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue