bodsch / bodsch.systemd / 1.1.0 / module / journalctl Query the systemd journal with a very limited number of possible parameters. | "added in version" 1.1.0 of bodsch.systemd" Authors: Bodo 'bodsch' Schulz <bodo@boone-schulz.de>bodsch.systemd.journalctl (1.1.0) — module
Install with ansible-galaxy collection install bodsch.systemd:==1.1.0
collections: - name: bodsch.systemd version: 1.1.0
Query the systemd journal with a very limited number of possible parameters.
In certain cases there are errors that are not clearly traceable but are logged in the journal.
This module is intended to be a tool for error analysis.
- name: chrony entries from journalctl bodsch.systemd.journalctl: identifier: chrony lines: 50 register: journalctl when: - ansible_service_mgr == 'systemd'
- name: journalctl entries from this module bodsch.systemd.journalctl: identifier: ansible-journalctl lines: 250 register: journalctl when: - ansible_service_mgr == 'systemd'
unit: description: - Show logs from the specified unit required: false type: str lines: description: - Number of journal entries to show required: false type: int reverse: description: - Show the newest entries first required: false type: bool arguments: description: - A list of custom attributes required: false type: list identifier: description: - Show entries with the specified syslog identifier required: false type: str
cmd: description: - journalctl with the called parameters type: string rc: description: - Return Value type: int stderr: description: - The output as a list on stderr type: list stdout: description: - The output as a list on stdout type: list