Fact gathering does not have a variable_manager yet, so we need to put
in an if condition for localhost fact gathering.
Additionally, simple errors, such as our local code is prohibited
message, wind up just being {'msg': 'Error Message', 'failed': True}. We
don't need to emit that as a json dict- we can TOTALLY emit that as, you
know, a string after ERROR. So it'll look like:
2017-07-21 06:38:28.982788 | localhost | ERROR: Executing local code is prohibited
Story: 2001129
Task: 4838
Change-Id: Ie9f3bd917bf75f5a566a8a1a09ccf9f29786d82f