Destroy and delete a virtual machine. (vagrant destroy -f)

    This also removes the salt_id name defined by vagrant.init.

    CLI Example:

    .. code-block:: bash

        salt <host> vagrant.destroy <salt_id>

def destroy(name):
    '''
    Destroy and delete a virtual machine. (vagrant destroy -f)

    This also removes the salt_id name defined by vagrant.init.

    CLI Example:

    .. code-block:: bash

        salt <host> vagrant.destroy <salt_id>
    '''
    vm_ = get_vm_info(name)
    machine = vm_['machine']

    cmd = 'vagrant destroy -f {}'.format(machine)

    ret = __salt__['cmd.run_all'](cmd,
                                  runas=vm_.get('runas'),
                                  cwd=vm_.get('cwd'),
                                  output_loglevel='info')
    if ret['retcode'] == 0:
        _erase_vm_info(name)
        return 'Destroyed VM {0}'.format(name)
    return False