Skip to content

Commit

Permalink
Add reporter to report logs sent by foreman callback
Browse files Browse the repository at this point in the history
When ansible fails to connect to remote host,
callback sends a report to Foreman without
any indication that the report comes from
Ansible. As a result, Foreman is unable
to determine the report origin.

This adds a 'reporter' attribute into
the logs that are sent.
  • Loading branch information
Ondrej Prazak authored and m-bucher committed Jul 13, 2020
1 parent 8ebda3f commit dc430ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/callback/foreman.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ def _build_log(self, data):
'messages': {
'message': json.dumps(msg)
},
'level': level
'level': level,
'reporter': 'ansible'
}
})
return logs
Expand Down

0 comments on commit dc430ae

Please sign in to comment.