Skip to content

Instantly share code, notes, and snippets.

@kaplan
Last active December 28, 2020 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaplan/22461fa6b97195a613439580d22da3cd to your computer and use it in GitHub Desktop.
Save kaplan/22461fa6b97195a613439580d22da3cd to your computer and use it in GitHub Desktop.
#@IgnoreInspection BashAddShebang
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "workalicious/ubuntu1604"
config.vm.box_check_update = false
config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
config.vm.network "private_network", ip: "192.169.43.17"
config.vm.synced_folder "www/html", "/var/www/html"
# for VMWare 12 and Big Sur update (purchase new lic)
config.vm.provider :vmware_fusion do |v|
v.ssh_info_public = true
end
# add macOS public key, needed for SequelPro
config.vm.provision "shell",
inline: "echo \033[47m\033[31m - adding public key - \033[0m", keep_color: true
ssh_pub_key = File.readlines("/etc/ssh/ssh_host_rsa_key.pub").first.strip
config.vm.provision "shell", inline: "echo #{ssh_pub_key} >> /home/vagrant/.ssh/authorized_keys"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment