I just suspended an instance that I had created using an Ansible playbook.
My Vagrantfile:
Vagrant.configure(2) do |config|
config.vm.box = "hashicorp/precise64"
config.vm.network "private_network", ip: "192.168.33.15"
vagrant_root = File.dirname(__FILE__)
ENV['ANSIBLE_ROLES_PATH'] = "#{vagrant_root}/ansible/roles"
config.vm.provision :ansible do |ansible|
ansible.playbook = "ansible/playbooks/pbook.yml"
ansible.verbose = "vvvv"
end
end
When I did vagrant resume, MUCH to my surprise and annoyance, Vagrant/Ansible reprovisioned the instance, blowing away a lot of work.
I was under the firm assumption, that vagrant resume would NEVER rerun a provisioner, unless explicitly asked.
Why did this happen, and how can I prevent it from happening again?
/Lasse