vagrant resume runs Ansible provider most unexpectedly

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

vagrant resume runs Ansible provider most unexpectedly

lasse
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

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/fc2585c6-d7c8-4cb8-91f5-d85df45e3437%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: vagrant resume runs Ansible provider most unexpectedly

lasse

Meanwhile, more thorough googling revealed https://github.com/mitchellh/vagrant/issues/6787
The issue is closed, so I hope the bug is fixed in newer versions, however ubuntu seems to continue to install version 1.8.1+dfsg-1 with apt-get, so I guess there are many who might still be bitten by this by accident. I would suggest a mention in the docs that some versions have a potentially destructive behaviour on vagrant resume!

/Lasse

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/be8191fd-1ce2-46b6-a30c-8b8e9ff9a184%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: vagrant resume runs Ansible provider most unexpectedly

Alvaro Miranda Aguilera
Hello
The issue you reference was fixed on 

1.8.3 (June 10, 2016)


So you can install the version available on the vagrant website to be up to date
Alvaro


On Mon, Jun 12, 2017 at 10:16 AM, <[hidden email]> wrote:

Meanwhile, more thorough googling revealed https://github.com/mitchellh/vagrant/issues/6787
The issue is closed, so I hope the bug is fixed in newer versions, however ubuntu seems to continue to install version 1.8.1+dfsg-1 with apt-get, so I guess there are many who might still be bitten by this by accident. I would suggest a mention in the docs that some versions have a potentially destructive behaviour on vagrant resume!

/Lasse

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/be8191fd-1ce2-46b6-a30c-8b8e9ff9a184%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ex5JPb42mVQ_8F9ehu1NLjqnRT_nfbmatpEq-010fxe2A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.