diff --git a/playbooks/site_rdo.yaml b/playbooks/site_rdo.yaml index b098f9e3..86b84c7b 100644 --- a/playbooks/site_rdo.yaml +++ b/playbooks/site_rdo.yaml @@ -9,6 +9,7 @@ roles: - service/node-exporter - system/update-host + - system/podman - hosts: backup-rdo roles: diff --git a/playbooks/site_sf.yaml b/playbooks/site_sf.yaml index 775009d6..fc33772f 100644 --- a/playbooks/site_sf.yaml +++ b/playbooks/site_sf.yaml @@ -11,6 +11,7 @@ - infra/ssh - service/node-exporter - system/update-host + - system/podman - hosts: backup-sf roles: diff --git a/roles/system/podman/defaults/main.yaml b/roles/system/podman/defaults/main.yaml new file mode 100644 index 00000000..8a307936 --- /dev/null +++ b/roles/system/podman/defaults/main.yaml @@ -0,0 +1,3 @@ +--- +# set 1000MB in bytes +log_size_max: 1048576000 diff --git a/roles/system/podman/tasks/main.yaml b/roles/system/podman/tasks/main.yaml new file mode 100644 index 00000000..0b919a07 --- /dev/null +++ b/roles/system/podman/tasks/main.yaml @@ -0,0 +1,18 @@ +--- +- name: Set max log limit - new way + become: true + ini_file: + path: /etc/containers/containers.conf + section: containers + option: log_size_max + value: "{{ log_size_max }}" + backup: true + +- name: Set max log limit - legacy + become: true + lineinfile: + path: /etc/containers/libpod.conf + regexp: "^max_log_size" + line: "max_log_size={{ log_size_max }}" + create: true + when: ansible_distribution_major_version|int < 8