Created
May 31, 2017 17:00
-
-
Save markahesketh/53b101148646a61554cc1ab6e9f51dd0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use rbconfig to determine if we're on a windows host or not. | |
require 'rbconfig' | |
is_windows = (RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/) | |
if is_windows | |
# Provisioning configuration for shell script. | |
config.vm.provision "shell" do |sh| | |
sh.path = "windows.sh" | |
sh.args = "build.yml" | |
end | |
else | |
# Provisioning configuration for Ansible (for Mac/Linux hosts). | |
config.vm.provision "ansible" do |ansible| | |
ansible.inventory_path = "./hosts/local" | |
ansible.playbook = "build.yml" | |
ansible.sudo = true | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment