Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vagrantsetup
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
devbox
vagrantsetup
Commits
4cbe3fdc
Commit
4cbe3fdc
authored
Sep 02, 2019
by
Reimar Stier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Conditionally show virtualbox GUI, add ssh key docs
parent
42d50dbc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
Readme.md
Readme.md
+5
-2
Vagrantfile
Vagrantfile
+10
-3
No files found.
Readme.md
View file @
4cbe3fdc
...
...
@@ -9,9 +9,12 @@ cd /vagrant
ansible-playbook playbook.yml --connection=local -i devbox, -e ansible_become=true
# SSH configuration
https://www.vagrantup.com/docs/vagrantfile/ssh_settings.html
config.ssh.insert_key=True
Provision own ssh key to the vagrant box. Compare
[
documentation|https://www.vagrantup.com/docs/vagrantfile/ssh_settings.html
]
`config.ssh.insert_key=True`
Vagrant adds its own private/public key pair to the box. Private key will be stored on the executing box in $(pwd)/.vagrant folder.
```
vagrant provision devbox --provision-with shell
```
# Graphics card issues
Issues with nvidia graphics card (NVIDIA Corporation GK106GLM
[
Quadro K2100M
]
).
...
...
Vagrantfile
View file @
4cbe3fdc
...
...
@@ -40,6 +40,8 @@ Vagrant.configure("2") do |config|
vb
.
cpus
=
4
vb
.
name
=
BOX_NAME
vb
.
gui
=
ENV
[
"SHOW_GUI"
]
||=
"false"
# https://www.virtualbox.org/manual/ch08.html
vb
.
customize
[
"modifyvm"
,
:id
,
"--vram"
,
"128"
]
vb
.
customize
[
"modifyvm"
,
:id
,
"--graphicscontroller"
,
"vboxvga"
]
...
...
@@ -67,9 +69,14 @@ Vagrant.configure("2") do |config|
config
.
vm
.
provision
"shell"
do
|
s
|
ssh_pub_key
=
File
.
readlines
(
"
#{
Dir
.
home
}
/.ssh/id_rsa.pub"
).
first
.
strip
s
.
inline
=
<<-
SHELL
echo
#{
ssh_pub_key
}
>> /home/vagrant/.ssh/authorized_keys
mkdir -p /root/.ssh
echo
#{
ssh_pub_key
}
>> /root/.ssh/authorized_keys
if grep -sq "
#{
ssh_pub_key
}
" /home/vagrant/.ssh/authorized_keys; then
echo "SSH keys already provisioned."
exit 0;
else
echo
#{
ssh_pub_key
}
>> /home/vagrant/.ssh/authorized_keys
mkdir -p /root/.ssh
echo
#{
ssh_pub_key
}
>> /root/.ssh/authorized_keys
fi
SHELL
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment