Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

update Vagrantfile to create ssh rsa keys if they don't already exist #201

Merged
merged 1 commit into from
Jul 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions contribution/vagrant/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ else
VM_NAME = "kubearmor-dev"
end

system("
if [ #{ARGV[0]} = 'up' ]; then
if [ ! -f ~/.ssh/id_rsa ]
then
echo '~/.ssh/id_rsa keys does not exist.'
ssh-keygen -t rsa -f ~/.ssh/id_rsa
fi
fi
")

Vagrant.configure("2") do |config|
# Need updated vbguest and reload for latest kernel
if ENV['NETNEXT'] == "1" then
Expand Down