user = node[:settings][:user]
+debian_mirror = node[:settings][:debian_mirror]
+
+execute 'set_debian_mirror' do
+ command "sed -i 's,http://ftp.uk.debian.org/debian/,#{debian_mirror},g' /etc/apt/sources.list"
+end
execute "apt-get-update" do
command "apt-get update"
help="Spew out even more information than normal")
parser.add_option("-c", "--clean", action="store_true", default=False,
help="Build from scratch, rather than attempting to update the existing server")
+parser.add_option("--debian-mirror", default="http://ftp.uk.debian.org/debian/",
+ help="Use the specified Debian mirror in the box's /etc/apt/sources.list.")
options, args = parser.parse_args()
config = {}
vagrantfile += """
config.vm.provision :shell, :inline => 'sudo echo "Acquire::http {{ Proxy \\"{0}\\"; }};" > /etc/apt/apt.conf.d/02proxy && sudo apt-get update'
""".format(config['aptproxy'])
+
vagrantfile += """
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "cookbooks"
:settings => {
:sdk_loc => "/home/vagrant/android-sdk",
:ndk_loc => "/home/vagrant/android-ndk",
+ :debian_mirror => "%s",
:user => "vagrant"
}
}
chef.add_recipe "kivy"
end
end
-"""
+""" % (options.debian_mirror)
# Check against the existing Vagrantfile, and if they differ, we need to
# create a new box: