Boa tarde, seguindo o exercício da aula '5. Rodando o puppet automaticamente' utilizando o Vagrantfile
a seguir:
Vagrant.configure(2) do |config|
config.vm.box = "hashicorp/precise32"
config.vm.define :web do |web_config|
web_config.vm.network "private_network", ip: "192.168.50.10"
web_config.vm.provision "puppet" do |puppet|
puppet.manifest_file = "web.pp"
end
end
end
A saída foi diferente da mostrada no vídeo, dizendo que a maquina virtual já havia sido provisionada. Conforme o log:
Bringing machine 'web' up with 'virtualbox' provider...
==> web: Checking if box 'hashicorp/precise32' is up to date...
==> web: Clearing any previously set forwarded ports...
==> web: Clearing any previously set network interfaces...
==> web: Preparing network interfaces based on configuration...
web: Adapter 1: nat
web: Adapter 2: hostonly
==> web: Forwarding ports...
web: 22 (guest) => 2222 (host) (adapter 1)
==> web: Booting VM...
==> web: Waiting for machine to boot. This may take a few minutes...
web: SSH address: 127.0.0.1:2222
web: SSH username: vagrant
web: SSH auth method: private key
==> web: Machine booted and ready!
==> web: Checking for guest additions in VM...
web: The guest additions on this VM do not match the installed version of
web: VirtualBox! In most cases this is fine, but in rare cases it can
web: prevent things such as shared folders from working properly. If you see
web: shared folder errors, please make sure the guest additions within the
web: virtual machine match the version of VirtualBox you have installed on
web: your host and reload your VM.
web:
web: Guest Additions Version: 4.2.0
web: VirtualBox Version: 5.1
==> web: Configuring and enabling network interfaces...
==> web: Mounting shared folders...
web: /vagrant => /Users/kaoe/Alura/musicjungle
web: /tmp/vagrant-puppet/manifests-a11d1078b1b1f2e3bdea27312f6ba513 => /Users/kaoe/Alura/musicjungle/manifests
==> web: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> web: flag to force provisioning. Provisioners marked to run always will still run.
Para que o puppet rode tenho que usar o comando a seguir indicado pelo vagrant vagrant provision
, acredito que o comportamento da ferramenta tenha mudado.
Alguém sabe dizer se realmente se trata de uma mudança de comportamento ou se algo mais é necessário para que se tenha o comportamento desejado de o puppet rodar juntamente com vagrant up
?