nginx: Fix newsyslog config on OpenBSD
This commit is contained in:
parent
34daaee91e
commit
a5dafee6cb
1 changed files with 11 additions and 0 deletions
|
@ -70,6 +70,17 @@
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
when: ansible_os_family == "RedHat"
|
when: ansible_os_family == "RedHat"
|
||||||
|
|
||||||
|
- name: Fix rotating access.log
|
||||||
|
ansible.builtin.lineinfile:
|
||||||
|
path: /etc/newsyslog.conf
|
||||||
|
regexp: "^{{ item }}\\s"
|
||||||
|
line: |-
|
||||||
|
{{ '{:<40}'.format(item) }}644 7 250 * Z /var/run/nginx.pid
|
||||||
|
with_items:
|
||||||
|
- /var/www/logs/access.log
|
||||||
|
- /var/www/logs/error.log
|
||||||
|
when: ansible_system == "OpenBSD"
|
||||||
|
|
||||||
- name: Enable nginx service
|
- name: Enable nginx service
|
||||||
ansible.builtin.service:
|
ansible.builtin.service:
|
||||||
name: nginx
|
name: nginx
|
||||||
|
|
Loading…
Add table
Reference in a new issue