starikovs
starikovs

Reputation: 3398

How to run vagrant provision on every up?

I need to run vagrant provision on every vagrant up, is it possible? For example, this provision is run only on first vagrant up:

config.vm.provision "shell", privileged: false,  path: "provision.sh"

What should I specify to run it always on vagrant up?

Upvotes: 3

Views: 5261

Answers (1)

Frederic Henri
Frederic Henri

Reputation: 53793

From vagrant 1.6, this issue has been fixed/addressed so you can specify if you want to run a specific provision on each up you can add :run => 'always' to your provisioning line as:

config.vm.provision :shell, :run => 'always', :path => "provision.sh", :privileged => false

the default value is once

Upvotes: 10

Related Questions