puppet - Vagrant multi machine not running global settings -
i new vagrant apologies in advance sure obvious.
i trying write vagrant file support multiple machines. test started basic file:
vagrant::configure("2") |config| # use standard box config.vm.box = 'precise64' config.vm.box_url = 'http://files.vagrantup.com/precise64.box' # set timezone useful config.vm.provision :shell, :inline => "echo \"europe/london\" | sudo tee /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata" # update servers config.vm.provision :shell, :inline => "apt-get update --fix-missing" end this worked expected, timezone set, updates run. so, went ahead following:
vagrant::configure("2") |config| # use standard box config.vm.box = 'precise64' config.vm.box_url = 'http://files.vagrantup.com/precise64.box' # set timezone useful config.vm.provision :shell, :inline => "echo \"europe/london\" | sudo tee /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata" # update servers config.vm.provision :shell, :inline => "apt-get update --fix-missing" config.vm.define :lamp |lamp| lamp.vm.hostname = "lamp.local" lamp.vm.network :private_network, ip: "33.33.33.10" #lamp.vm.provision :shell, :inline => "apt-get update --fix-missing" end end unfortunately, did not work. box came fine, timezone not set, updates not run or ip set. commented line apt-get update tried no luck. must simple sure. through reading documentation, global settings should applied.. guess need understand why arent. adam
with vagrant 1.3.0, vagrant up no longer provisioning after first (if use vagrant halt or vagrant reload).
so may want try doing vagrant destroy before vagrant up again. there bug in 1.3.2 didn't make vagrant destroy reprovisioning, fixed in next version (1.3.3).
or may try executing manually vagrant provision or vagrant --provision.
Comments
Post a Comment