Verifies that the specified host is not known by the given user

    name
        The host name
        Note that only single host names are supported.  If foo.example.com
        and bar.example.com are the same machine and you need to exclude both,
        you will need one Salt state for each.

    user
        The user who owns the ssh authorized keys file to modify

    config
        The location of the authorized keys file relative to the user's home
        directory, defaults to ".ssh/known_hosts". If no user is specified,
        defaults to "/etc/ssh/ssh_known_hosts". If present, must be an
        absolute path when a user is not specified.

def absent(name, user=None, config=None):
    '''
    Verifies that the specified host is not known by the given user

    name
        The host name
        Note that only single host names are supported.  If foo.example.com
        and bar.example.com are the same machine and you need to exclude both,
        you will need one Salt state for each.

    user
        The user who owns the ssh authorized keys file to modify

    config
        The location of the authorized keys file relative to the user's home
        directory, defaults to ".ssh/known_hosts". If no user is specified,
        defaults to "/etc/ssh/ssh_known_hosts". If present, must be an
        absolute path when a user is not specified.
    '''
    ret = {'name': name,
           'changes': {},
           'result': True,
           'comment': ''}

    if not user:
        config = config or '/etc/ssh/ssh_known_hosts'
    else:
        config = config or '.ssh/known_hosts'

    if not user and not os.path.isabs(config):
        comment = 'If not specifying a "user", specify an absolute "config".'
        ret['result'] = False
        return dict(ret, comment=comment)

    known_host = __salt__['ssh.get_known_host_entries'](user=user, hostname=name, config=config)
    if not known_host:
        return dict(ret, comment='Host is already absent')

    if __opts__['test']:
        comment = 'Key for {0} is set to be removed from {1}'.format(name,
                                                                     config)
        ret['result'] = None
        return dict(ret, comment=comment)

    rm_result = __salt__['ssh.rm_known_host'](user=user, hostname=name, config=config)
    if rm_result['status'] == 'error':
        return dict(ret, result=False, comment=rm_result['error'])
    else:
        return dict(ret,
                    changes={'old': known_host, 'new': None},
                    result=True,
                    comment=rm_result['comment'])