nginx-server: Make logs readable on CentOS 7
This commit is contained in:
parent
f86928ae3f
commit
d516a33079
1 changed files with 19 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue