def format_parsing_error(result):
    """
    Output a formatted version of any parsing
    errors that Ansible runs into when looking
    at a playbook, if any are present.

    :param result: result to inspect
    :return: formatted output message
    """
    if 'reason' in result:
        return 'Parsing the playbook failed:\n{}'.format(result['reason'])

    return ''