--- - name: Ensure rsyslog is installed ansible.builtin.apt: name: rsyslog state: present update_cache: true cache_valid_time: 3600 when: cis_enable_rsyslog | bool - name: Ensure rsyslog is enabled and running ansible.builtin.systemd: name: rsyslog enabled: true state: started when: - cis_enable_rsyslog | bool - not cis_container_detected | default(false) | bool - name: Validate journald configuration file presence ansible.builtin.stat: path: /etc/systemd/journald.conf register: cis_journald_conf - name: Report journald configuration status ansible.builtin.debug: msg: >- {{ 'OK: /etc/systemd/journald.conf is present.' if cis_journald_conf.stat.exists else 'WARNING: /etc/systemd/journald.conf was not found.' }}