nginx-server: Make logs readable on CentOS 7

This commit is contained in:
Timo Makinen 2021-09-26 13:14:06 +00:00
parent f86928ae3f
commit d516a33079

View file

@ -70,6 +70,25 @@
job: /usr/local/sbin/nginx-logrotate
when: ansible_os_family == "OpenBSD"
- name: set logdir permissions
file:
path: /var/log/nginx
mode: 0755
owner: root
group: root
when:
- ansible_distribution == "CentOS"
- ansible_distribution_major_version == "7"
- name: set logfile permissions
lineinfile:
path: /etc/logrotate.d/nginx
regexp: '^\s+create '
line: " create 0644 nginx root"
when:
- ansible_distribution == "CentOS"
- ansible_distribution_major_version == "7"
- import_role:
name: sftpuser
vars: