def _bootstrap_debian(name, **kwargs):
    version = kwargs.get('version', False)
    if not version:
        if __grains__['os'].lower() == 'debian':
            version = __grains__['osrelease']
        else:
            version = 'stable'

    release_blacklist = ['hamm', 'slink', 'potato', 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy']
    if version in release_blacklist:
        raise CommandExecutionError(
            'Unsupported Debian version "{0}". '
            'Only "stable" or "jessie" and newer are supported'.format(version)
        )

    dst = _make_container_root(name)
    cmd = 'debootstrap --arch=amd64 {0} {1}'.format(version, dst)
    ret = __salt__['cmd.run_all'](cmd, python_shell=False)
    if ret['retcode'] != 0:
        _build_failed(dst, name)
    return ret
Bootstrap a Debian Linux container
dataset/ETHPy150Open saltstack/salt/salt/modules/nspawn.py/_bootstrap_debian