|
| 1 | +# powershell does not accept empty string arguments with any sort of grace |
| 2 | +# |
| 3 | +# for instance: |
| 4 | +# powershell -ExecutionPolicy Bypass -OutputFormat Text -file "C:\tmp\vagrant-shell.ps1" "dev7.dev7.corp" "" "" "_1234" |
| 5 | +# |
| 6 | +# results in CI_API_TOKEN being interpreted as CI_API_KEY since the middle empty strings are ignored |
| 7 | +# we will use `@@empty@@` as a placeholder which will be respected by provision.ps1 when setting environment variables |
| 8 | +lw_account = ENV['CI_ACCOUNT'] |
| 9 | +if lw_account == nil |
| 10 | + lw_account = "@@empty@@" |
| 11 | +end |
| 12 | + |
| 13 | +lw_api_key = ENV['CI_API_KEY'] |
| 14 | +if lw_api_key == nil |
| 15 | + lw_api_key = "@@empty@@" |
| 16 | +end |
| 17 | + |
| 18 | +lw_api_secret = ENV['CI_API_SECRET'] |
| 19 | +if lw_api_secret == nil |
| 20 | + lw_api_secret = "@@empty@@" |
| 21 | +end |
| 22 | + |
| 23 | +lw_api_token = ENV['CI_API_TOKEN'] |
| 24 | +if lw_api_token == nil |
| 25 | + lw_api_token = "@@empty@@" |
| 26 | +end |
| 27 | + |
| 28 | +# 2.3.7 was giving all sorts of grief communicating via WinRM; specifically |
| 29 | +# Message: Digest initialization failed: initialization error |
| 30 | +Vagrant.require_version "<= 2.3.6" |
| 31 | + |
1 | 32 | Vagrant.configure("2") do |config| |
| 33 | + config.vm.communicator = "winrm" |
| 34 | + |
2 | 35 | config.vm.box = "senglin/win-10-enterprise-vs2015community" |
3 | 36 | config.vm.box_version = "1.0.0" |
| 37 | + |
4 | 38 | config.vm.synced_folder "../../../bin", "/devcli" |
5 | | - config.vm.provision "shell", |
6 | | - inline: "New-Item -ItemType SymbolicLink -Target \"C:/devcli/lacework-cli-windows-amd64.exe\" -Path \"C:/Users/vagrant/lacework.exe\"" |
7 | 39 |
|
8 | 40 | config.vm.provider "virtualbox" do |v| |
9 | 41 | v.gui = true |
| 42 | + v.cpus = 2 |
| 43 | + v.memory = 1024 |
| 44 | + # Enables or disables the use of hardware virtualization extensions in the processor of the host system. |
| 45 | + v.customize ["modifyvm", :id, "--hwvirtex", "on"] |
| 46 | + # Specifies the amount of RAM to allocate to the virtual graphics card. |
| 47 | + v.customize ["modifyvm", :id, "--vram", "256"] |
10 | 48 | end |
| 49 | + config.vm.provision "shell", path: "provision.ps1", args: [lw_account, lw_api_key, lw_api_secret, lw_api_token] |
11 | 50 | end |
12 | | - |
|
0 commit comments