From 742336a8ad79fbe2cecbd40366d3e98bc9840c33 Mon Sep 17 00:00:00 2001 From: Andrea V <1577639+karimodm@users.noreply.github.com> Date: Tue, 5 Dec 2023 12:37:19 +0100 Subject: [PATCH] Better task to insert maxsize --- deploy/ansible/roles/iota-core-node/tasks/main.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/deploy/ansible/roles/iota-core-node/tasks/main.yml b/deploy/ansible/roles/iota-core-node/tasks/main.yml index 5c6e7a2d9..12eaea423 100644 --- a/deploy/ansible/roles/iota-core-node/tasks/main.yml +++ b/deploy/ansible/roles/iota-core-node/tasks/main.yml @@ -4,12 +4,12 @@ poll: 5 - name: Set log rotation for a maximum size of 5GB - lineinfile: + blockinfile: path: /etc/logrotate.d/rsyslog - regexp: '^\{\n\s*rotate' - insertbefore: '^\{\n\s*rotate' - line: ' maxsize 5G' - notify: restart rsyslog + block: maxsize 5G + marker: "# {mark} ANSIBLE MANAGED BLOCK" + insertafter: "{\n" + state: present - name: Create node directory file: