ansible/ansible — pull request #1014 by marktheunissen (2012-09-07 01:07:01+00:00)
Title: Fix regex that allows passwords to get into syslog, use journal if available.

This does two things:

1. There was a bug in the previous regex, where if the password parameter was the last argument on the line, the regex wouldn't match, as it requires a space afterwards to match. Therefore, passwords can be stored in syslog.

2. If the systemd journal is available, it will log to that instead of syslog. To test, use Fedora 17 and install the [python-systemd](https://github.com/systemd/python-systemd) package. Run `sudo journalctl -f --output=json` to monitor log. Run an ansible command. The log entries look like:

```json
{
"MESSAGE" : "Ansible module invoked",
"MODULE" : "file",
"SRC" : "None",
"GROUP" : "None",
"STATE" : "absent",
"SELEVEL" : "None",
"SEUSER" : "None",
"SEROLE" : "None",
"MODE" : "None",
"OWNER" : "None",
"PATH" : "/home/mark/test",
"PASSWORD" : "NOT_LOGGING_PASSWORD",
"SETYPE" : "None",
}
```