Skip to content

Commit

Permalink
logrotate to maxsize to 5GB
Browse files Browse the repository at this point in the history
  • Loading branch information
karimodm committed Dec 4, 2023
1 parent 73bcaa9 commit c3fd283
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions deploy/ansible/roles/iota-core-node/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: restart rsyslog
ansible.builtin.service:
name: rsyslog
state: restarted
8 changes: 8 additions & 0 deletions deploy/ansible/roles/iota-core-node/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
async: 300
poll: 5

- name: Set log rotation for a maximum size of 5GB
ansible.builtin.lineinfile:
path: /etc/logrotate.d/rsyslog
regexp: '^\{\n\s*rotate'
insertbefore: '^\{\n\s*rotate'
line: ' maxsize 5G'
notify: restart rsyslog

- name: Create node directory
file:
path: /opt/iota-core
Expand Down

0 comments on commit c3fd283

Please sign in to comment.