diff --git a/home/.chezmoiscripts/universal/run_onchange_after_41-vagrant-vmware-utility.sh.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_41-vagrant-vmware-utility.sh.tmpl index ab83b2a9..181f1067 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_41-vagrant-vmware-utility.sh.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_41-vagrant-vmware-utility.sh.tmpl @@ -13,7 +13,6 @@ # # ## Links # -# * [`run_onchange_after_41-vagrant-vmware-utility.tmpl`](https://github.com/megabyte-labs/install.doctor/blob/master/home/.chezmoiscripts/universal/run_onchange_after_41-vagrant-vmware-utiltiy.tmpl) # * [Vagrant VMWare Utility on GitHub](https://github.com/hashicorp/vagrant-vmware-desktop) # * [`home/.chezmoidata.yaml`](https://github.com/megabyte-labs/install.doctor/blob/master/home/.chezmoidata.yaml) diff --git a/home/.chezmoiscripts/universal/run_onchange_after_44-vmware-install.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_44-vmware-install.tmpl index 67d6b95c..ab66ceb9 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_44-vmware-install.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_44-vmware-install.tmpl @@ -1,5 +1,40 @@ {{- if eq .host.distro.family "linux" -}} +{{- $softwareGroup := nospace (cat "_" .host.softwareGroup) -}} +{{- $softwareList := list (index .softwareGroups $softwareGroup | toString | replace "[" "" | replace "]" "") | uniq | join " " -}} +{{- if (contains " vmware" $softwareList) -}} #!/usr/bin/env bash +# @file Linux VMWare Workstation Install +# @brief Installs VMWare Workstation Pro on Linux devices, applies a "publicly-retrieved" license key (see disclaimer), and automatically accepts the terms and conditions +# @description +# This script ensures the user included `vmware` in their software installation list. It then checks for presence of the `vmware` utility. If it is not present, then the script: +# +# 1. Downloads the [VMWare Workstation Pro](https://www.vmware.com/content/vmware/vmware-published-sites/us/products/workstation-pro.html.html) Linux installer +# 2. Installs VMWare Workstation Pro +# 3. Passes options to the installation script that automatically apply a publicly retrived license key and accept the Terms & Conditions +# +# **DISCLAIMER:** If you plan on using VMWare Workstation for anything but evaluation purposes, then we highly suggest purchasing a copy +# of VMWare Workstation. The "publicly-retrived" license keys are scattered throughout GitHub and we are not exactly +# sure why they work. You can pass in your own key by utilizing the `VMWARE_WORKSTATION_LICENSE_KEY` environment variable. More details on +# using environment variables or repository-housed encrypted secrets can be found in our [Secrets documentation](https://install.doctor/docs/customization/secrets). +# +# ## VMWare on macOS +# +# This script only installs VMWare Workstation on Linux. The macOS-variant titled VMWare Fusion can be installed using a Homebrew +# cask so a "work-around" script does not have to be used. +# +# ## VMWare vs. Parallels vs. VirtualBox vs. KVM vs. Hyper-V +# +# There are a handful of VM virtualization providers you can choose from. VMWare is a nice compromise between OS compatibility and performance. +# Parallels, on the hand, might be better for macOS since it is designed specifically for macOS. Finally, VirtualBox is a truly free, +# open-source option that does not come with the same optimizations that VMWare and Parallels provide. +# +# Other virtualization options include KVM (Linux / macOS) and Hyper-V (Windows). These options are better used for headless +# systems. +# +# ## Links +# +# * [VMWare Workstation homepage](https://www.vmware.com/content/vmware/vmware-published-sites/us/products/workstation-pro.html.html) + {{- $secretKey := "" -}} {{- if (stat (joinPath (.chezmoi.sourceDir ".chezmoitemplates" "secrets" "VMWARE_WORKSTATION_LICENSE_KEY"))) -}} @@ -38,3 +73,4 @@ else logg info 'VMware Workstation is already installed' fi {{ end -}} +{{ end -}}