Print out YAML using the block mode

def output(data, **kwargs):  # pylint: disable=unused-argument
    '''
    Print out YAML using the block mode
    '''

    params = {}
    if 'output_indent' not in __opts__:
        # default indentation
        params.update(default_flow_style=False)
    elif __opts__['output_indent'] >= 0:
        # custom indent
        params.update(default_flow_style=False,
                      indent=__opts__['output_indent'])
    else:  # no indentation
        params.update(default_flow_style=True,
                      indent=0)
    try:
        return salt.utils.yaml.safe_dump(data, **params)
    except Exception as exc:
        import pprint
        log.exception(
            'Exception %s encountered when trying to serialize %s',
            exc, pprint.pformat(data)
        )