community / community.general / 2.5.9 / module / syslogger Log messages in the syslog Authors: Tim Rightnour (@garbled1)community.general.syslogger (2.5.9) — module
Install with ansible-galaxy collection install community.general:==2.5.9
collections: - name: community.general version: 2.5.9
Uses syslog to add log entries to the host.
- name: Simple Usage community.general.syslogger: msg: "I will end up as daemon.info"
- name: Send a log message with err priority and user facility with log_pid community.general.syslogger: msg: "Hello from Ansible" priority: "err" facility: "user" log_pid: true
- name: Specify the name of application which is sending log message community.general.syslogger: ident: "MyApp" msg: "I want to believe" priority: "alert"
msg: description: - This is the message to place in syslog. required: true type: str ident: default: ansible_syslogger description: - Specify the name of application name which is sending the log to syslog. type: str version_added: 0.2.0 version_added_collection: community.general log_pid: default: false description: - Log the PID in brackets. type: bool facility: choices: - kern - user - mail - daemon - auth - lpr - news - uucp - cron - syslog - local0 - local1 - local2 - local3 - local4 - local5 - local6 - local7 default: daemon description: - Set the log facility. type: str priority: choices: - emerg - alert - crit - err - warning - notice - info - debug default: info description: - Set the log priority. type: str
facility: description: Syslog facility returned: always sample: info type: str ident: description: Name of application sending the message to log returned: always sample: ansible_syslogger type: str version_added: 0.2.0 version_added_collection: community.general log_pid: description: Log PID status returned: always sample: true type: bool msg: description: Message sent to syslog returned: always sample: Hello from Ansible type: str priority: description: Priority level returned: always sample: daemon type: str