Skip to content

Commit 9d28e8a

Browse files
committed
Add centOS 6 and 7 vagrant quickstart Vagrantfile
1 parent a8078b2 commit 9d28e8a

File tree

3 files changed

+71
-0
lines changed

3 files changed

+71
-0
lines changed

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,13 @@
11
# quickstart
22
My QuickStart project
3+
4+
## Install the vagrant plugin first
5+
```sh
6+
$ vagrant plugin list
7+
ansible (0.2.2)
8+
psych (2.0.8)
9+
vagrant-cachier (1.2.1)
10+
vagrant-librarian-puppet (0.9.2)
11+
vagrant-share (1.1.6, system)
12+
vagrant-vbguest (0.13.0)
13+
```

va-centos-6/Vagrantfile

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
VMNAME = File.basename(Dir.getwd)
5+
6+
Vagrant.configure(2) do |config|
7+
config.vm.box = "puppetlabs/centos-6.6-64-nocm"
8+
config.vm.box_check_update = false
9+
config.vm.hostname = "#{VMNAME}.vagrant.local"
10+
config.vm.provider :virtualbox do |vb|
11+
vb.name = VMNAME
12+
vb.gui = false
13+
vb.cpus = 1
14+
vb.memory = 512
15+
end
16+
17+
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
18+
19+
# plugin conflict
20+
if Vagrant.has_plugin?("vagrant-vbguest") then
21+
config.vbguest.auto_update = false
22+
end
23+
24+
config.vm.provision "shell", inline: <<-SHELL
25+
date && lsb_release -a
26+
echo "***********************************************************"
27+
echo "--- WELCOME! Please run \"vagrant ssh\" to log into the VM! ---"
28+
echo "***********************************************************"
29+
SHELL
30+
end

va-centos-7/Vagrantfile

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
VMNAME = File.basename(Dir.getwd)
5+
6+
Vagrant.configure(2) do |config|
7+
config.vm.box = "puppetlabs/centos-7.2-64-nocm"
8+
config.vm.box_check_update = false
9+
config.vm.hostname = "#{VMNAME}.vagrant.local"
10+
config.vm.provider :virtualbox do |vb|
11+
vb.name = VMNAME
12+
vb.gui = false
13+
vb.cpus = 1
14+
vb.memory = 512
15+
end
16+
17+
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
18+
19+
# plugin conflict
20+
if Vagrant.has_plugin?("vagrant-vbguest") then
21+
config.vbguest.auto_update = false
22+
end
23+
24+
config.vm.provision "shell", inline: <<-SHELL
25+
date && lsb_release -a
26+
echo "***********************************************************"
27+
echo "--- WELCOME! Please run \"vagrant ssh\" to log into the VM! ---"
28+
echo "***********************************************************"
29+
SHELL
30+
end

0 commit comments

Comments
 (0)