You can see how I got around this problem here:

https://github.com/puphpet/puphpet/blob/master/archive/puphpet/shell/initial-setup.sh#L27

Basically, I create a blank file within the VM itself. If the file exists, 
the script exits and doesn't run.

Hope that helps.

Juan

On Thursday, February 26, 2015 at 2:00:53 PM UTC-6, Chris Withers wrote:
>
>  Hi All,
>
> I'm using Vagrant 1.7.2.
>
> As per the docs, I have a config that looks like this:
>
> Vagrant.configure(2) do |config|
>   config.vm.box = "puphpet/debian75-x64"
>   config.vm.provision "shell", path: "provisioning/setup.sh"
>   config.vm.provision "shell", path: "provisioning/packages.sh", run: "always"
> end
>
> I want setup.sh to run only when the VM is created, while I want 
> packages.sh to run every time there's a "vagrant up", regardless of whether 
> the VM is running or not and regardless of whether it has been provisioned 
> or not.
>
> https://docs.vagrantup.com/v2/provisioning/basic_usage.html suggests that 
> run: "always" is the way to do this, so what am I doing wrong?
>
> cheers,
>
> Chris
>  

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to