Ensure that the index alias is absent.

    name
        Name of the index alias to remove
    index
        Name of the index for the alias

def alias_absent(name, index):
    '''
    Ensure that the index alias is absent.

    name
        Name of the index alias to remove
    index
        Name of the index for the alias
    '''

    ret = {'name': name, 'changes': {}, 'result': True, 'comment': ''}

    try:
        alias = __salt__['elasticsearch.alias_get'](aliases=name, indices=index)
        if alias and alias.get(index, {}).get("aliases", {}).get(name, None) is not None:
            if __opts__['test']:
                ret['comment'] = 'Alias {0} for index {1} will be removed'.format(name, index)
                ret['changes']['old'] = alias.get(index, {}).get("aliases", {}).get(name, {})
                ret['result'] = None
            else:
                ret['result'] = __salt__['elasticsearch.alias_delete'](aliases=name, indices=index)
                if ret['result']:
                    ret['comment'] = 'Successfully removed alias {0} for index {1}'.format(name, index)
                    ret['changes']['old'] = alias.get(index, {}).get("aliases", {}).get(name, {})
                else:
                    ret['comment'] = 'Failed to remove alias {0} for index {1} for unknown reasons'.format(name, index)
        else:
            ret['comment'] = 'Alias {0} for index {1} is already absent'.format(name, index)
    except Exception as err:
        ret['result'] = False
        ret['comment'] = six.text_type(err)

    return ret