diff --git a/salt/modules/genesis.py b/salt/modules/genesis.py index 99d9bce62c..158051ddbc 100644 --- a/salt/modules/genesis.py +++ b/salt/modules/genesis.py @@ -32,8 +32,14 @@ def __virtual__(): return True -def bootstrap(platform, root, img_format='dir', fs_format='ext2', arch=None, - flavor=None, repo_url=None, static_qemu=None): +def bootstrap(platform, + root, + img_format='dir', + fs_format='ext2', + arch=None, + flavor=None, + repo_url=None, + static_qemu=None): ''' Create an image for a specific platform. @@ -100,7 +106,7 @@ def bootstrap(platform, root, img_format='dir', fs_format='ext2', arch=None, return _bootstrap_yum(root) elif platform == 'deb': return _bootstrap_deb( - root, arch=arch, flavor=flavor, static_qemu=static_qemu + root, arch=arch, flavor=flavor, repo_url=repo_url, static_qemu=static_qemu ) elif platform == 'pacman': return _bootstrap_pacman(root) @@ -133,7 +139,7 @@ def _bootstrap_deb( root, arch, flavor, - repo_url='http://ftp.debian.org/debian/', + repo_url=None, static_qemu=None ): ''' @@ -158,6 +164,9 @@ def _bootstrap_deb( (e.x.: /usr/bin/qemu-amd64-static) ''' + if repo_url is None: + repo_url = 'http://ftp.debian.org/debian/' + __salt__['cmd.run']( 'debootstrap --foreign --arch {arch} {flavor} {root} {url}'.format( arch=arch, flavor=flavor, root=root, url=repo_url