Hello, Alvaro,
Thanks for your response, but both options don't work for me:
1. Even if you call a ruby function/command inside the provider-specific block, the function/command is executed (and multiple times) for any provider.
# VirtualBox provider-specific configuration
server.vm.provider :virtualbox do |vb|
vb.landrush.enable
puts "Hello: my provider is VirtualBox"
end
In the example below, the message "Hello: my provider is VirtualBox" is printed a few times even if I start vagrant with the following command:
vagrant up --provider softlayer
2. Here, I want to run the ruby script (or ruby function) on the local machine and NOT on the guest machine, thus your idea does not work for me.
Actually, I want to run a ruby script which prepares a dynamic file in the sync directory for the provision script. Thus, I want to run the script locally just before the provisioning.
Regards,
-- Idan