Created
July 2, 2020 12:24
-
-
Save apatard/d3a5529e43854723a5f4c171c6bcb93a to your computer and use it in GitHub Desktop.
[UNTESTED] molecule-vagrant vs hyperv
This file contains hidden or 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
diff --git a/molecule_vagrant/modules/vagrant.py b/molecule_vagrant/modules/vagrant.py | |
index 4fdeae7..133c754 100644 | |
--- a/molecule_vagrant/modules/vagrant.py | |
+++ b/molecule_vagrant/modules/vagrant.py | |
@@ -333,6 +333,35 @@ Vagrant.configure('2') do |config| | |
end | |
end | |
+ ## | |
+ # hyperv | |
+ ## | |
+ | |
+ if provider['name'] == 'hyperv' | |
+ config.vm.provider provider['name'] do |hyperv, override| | |
+ hyperv.memory = provider_memory | |
+ hyperv.cpus = provider_cpus | |
+ | |
+ # Custom | |
+ provider['options'].each { |key, value| | |
+ eval("hyperv.#{key} = #{value}") | |
+ } | |
+ | |
+ # Raw Configuration | |
+ if provider['raw_config_args'] | |
+ provider['raw_config_args'].each { |raw_config_arg| | |
+ eval("hyperv.#{raw_config_arg}") | |
+ } | |
+ end | |
+ | |
+ if provider['override_args'] | |
+ provider['override_args'].each { |override_arg| | |
+ eval("override.#{override_arg}") | |
+ } | |
+ end | |
+ end | |
+ end | |
+ | |
## | |
# Instances |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment