pyranja / profile

My .dotfiles and utilities
The Unlicense
0 stars 0 forks source link

Add New-Vagrantfile command #69

Open pyranja opened 6 years ago

pyranja commented 6 years ago

Creates a base Vagrantfile with custom settings to allow running boxes on HyperV.

Example:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure('2') do |config|
  config.vm.box = 'kmm/ubuntu-xenial64'

  config.vm.network :public_network, bridge: 'vm-nat'
  config.vm.synced_folder '.', '/vagrant', type: 'smb', smb_username: ENV['HOST_USER'], smb_password: ENV['HOST_SECRET'], mount_options: ["domain=#{ENV['USERDNSDOMAIN']}"]

  config.vm.provider :hyperv do |hyperv|
    hyperv.vmname = 'node'
    hyperv.cpus = 2
    hyperv.memory = 1024
  end
end
pyranja commented 6 years ago

Replace HOST_USER with USERNAME and add ~\.config\powershell\env_profile.ps1 holding empty definition of HOST_SECRET

pyranja commented 6 years ago

Find a way to obfuscate HOST_SECRET while stored in env_profile.ps1 (e.g. encrypt with symmetric key embedded in py-ps). Add a warning to let users know that storing the password there is not secure.