is_windows = (RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/)
if is_windows
# Provisioning configuration for shell script.
local.vm.provision "shell" do |s|
s.path = "bootstrap.sh"
s.args = ["provisioning/#{action}.yml", "provisioning/inventory", "local"]
end
else
# Provisioning configuration for Ansible (for Mac/Linux hosts).
local.vm.provision "ansible" do |ansible|
ansible.sudo = true
ansible.playbook = "provisioning/#{action}.yml"
ansible.inventory_path = "provisioning/inventory"
ansible.verbose = "vv"
ansible.limit = "local"
end
end
to my Vagrantfile and it works (obviously not the same as native support but ok).
I'm sure Vagrant could do it on its own if this was part of the Ansible provisioning. Would it make sense?
Warren.