---
- name: install logs packages
  apt:
    force_apt_get: true
    install_recommends: false
    name: "{{ sysconfig_logs_packages }}"
  register: apt_status
  retries: 60
  until: apt_status is success or ('Failed to lock apt for exclusive operation' not in apt_status.msg and '/var/lib/dpkg/lock' not in apt_status.msg)

- name: start rsyslog
  systemd:
    name: rsyslog
    enabled: true
    state: started

- name: ensure journald logs persistence is enabled
  file:
    path: /var/log/journal
    state: directory
    mode: '755'

...
