diff --git a/ansible/roles/sf-base/defaults/main.yml b/ansible/roles/sf-base/defaults/main.yml index ae3d74fae..eed3ba574 100644 --- a/ansible/roles/sf-base/defaults/main.yml +++ b/ansible/roles/sf-base/defaults/main.yml @@ -24,3 +24,6 @@ base_sysctl: user.max_user_namespaces: 31089 kernel.sysrq: 0 vm.swappiness: 10 + +# set 1000MB in bytes +log_size_max: 1048576000 diff --git a/ansible/roles/sf-base/tasks/setup.yml b/ansible/roles/sf-base/tasks/setup.yml index 61170462c..36eac635c 100644 --- a/ansible/roles/sf-base/tasks/setup.yml +++ b/ansible/roles/sf-base/tasks/setup.yml @@ -146,3 +146,11 @@ - name: Trust crt shell: update-ca-trust when: new_crt is changed + +- name: Set max log limit in libpod configuration file + become: true + lineinfile: + path: /etc/containers/libpod.conf + regexp: "^max_log_size" + line: "max_log_size={{ log_size_max }}" + create: true