Last active
July 17, 2016 17:26
-
-
Save wate/f29289d11a1031e3d94b461d75525b0c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
# Every Vagrant development environment requires a box. You can search for | |
# boxes at https://atlas.hashicorp.com/search. | |
config.vm.box = "wate/debian-8" | |
# config.vm.box = " bento/debian-8.4" | |
# config.vm.network "forwarded_port", guest: 80, host: 8080 | |
config.vm.network "private_network", ip: "192.168.33.10" | |
# config.vm.network "public_network" | |
config.vm.synced_folder "./", "/vagrant" | |
# vagrant-vbguest | |
# https://github.com/dotless-de/vagrant-vbguest | |
if Vagrant.has_plugin?('vagrant-vbguest') | |
config.vbguest.auto_reboot = true | |
config.vbguest.auto_update = false | |
end | |
# vagrant-cachier | |
# http://fgrehm.viewdocs.io/vagrant-cachier/ | |
# ※Vagrant のプロビジョン時間を削減する vagrant-cachier プラグインが良い | |
# http://www.1x1.jp/blog/2014/09/vagrant-cachier-plugin.html | |
if Vagrant.has_plugin?('vagrant-cachier') | |
config.cache.scope = :box | |
config.cache.auto_detect = true | |
end | |
config.vm.provider "virtualbox" do |vb| | |
# 起動時に VirtualBox GUIを起動 | |
# vb.gui = true | |
# 仮想マシンの名前 | |
vb.name = "virtualbox_machine_name" | |
# 仮想マシンのメモリ | |
vb.memory = "1024" | |
end | |
config.vm.provision "shell", inline: <<-SHELL | |
echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list | |
apt-get update | |
apt-get install -y curl wget git rsync build-essential autoconf automake libtool bzip2 zip unzip bash-completion | |
SHELL | |
# Ansible | |
# config.vm.provision "shell", inline: <<-SHELL | |
# apt-get install -y ansible -t jessie-backports | |
# SHELL | |
# .NET Core SDK | |
# https://www.microsoft.com/net/core#debian | |
# config.vm.provision "shell", inline: <<-SHELL | |
# apt-get install -y libunwind8 gettext | |
# curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=809130 | |
# mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet | |
# ln -s /opt/dotnet/dotnet /usr/local/bin | |
# SHELL | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
# vagrant-vbguest | |
if Vagrant.has_plugin?('vagrant-vbguest') | |
config.vbguest.auto_reboot = true | |
config.vbguest.auto_update = false | |
end | |
# vagrant-cachier | |
if Vagrant.has_plugin?('vagrant-cachier') | |
config.cache.scope = :box | |
end | |
## Controlle ----------- | |
config.vm.define 'ctl_debian8' do |debian8| | |
debian8.vm.box = 'bento/debian-8.4' | |
debian8.vm.network 'private_network', ip: '192.168.33.10' | |
debian8.vm.provider 'virtualbox' do |v| | |
v.name = 'ctl-jessie' | |
v.memory = 1024 | |
v.customize ["modifyvm", :id, "--ostype", "Debian_64"] | |
end | |
debian8.vm.provision "shell", inline: <<-SHELL | |
echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list | |
apt-get update | |
apt-get install -y ansible -t jessie-backports | |
SHELL | |
end | |
config.vm.define 'ctl_ubuntu14' do |ubuntu14| | |
ubuntu14.vm.box = 'bento/ubuntu-14.04' | |
ubuntu14.vm.network 'private_network', ip: '192.168.33.11' | |
ubuntu14.vm.provider 'virtualbox' do |v| | |
v.name = 'ctl-trusty' | |
v.memory = 1024 | |
v.customize ["modifyvm", :id, "--ostype", "Ubuntu_64"] | |
end | |
ubuntu14.vm.provision "shell", inline: <<-SHELL | |
apt-get install -y software-properties-common | |
apt-add-repository -y ppa:ansible/ansible | |
apt-get update | |
apt-get install -y ansible | |
SHELL | |
end | |
config.vm.define 'ctl_centos6' do |centos6| | |
centos6.vm.box = 'bento/centos-6.7' | |
centos6.vm.network 'private_network', ip: '192.168.33.12' | |
centos6.vm.provider 'virtualbox' do |v| | |
v.name = 'ctl-centos6' | |
v.memory = 1024 | |
v.customize ["modifyvm", :id, "--ostype", "RedHat_64"] | |
end | |
centos6.vm.provision "shell", inline: <<-SHELL | |
yum install -y epel-release | |
yum install -y ansible | |
SHELL | |
end | |
config.vm.define 'ctl_centos7' do |centos7| | |
centos7.vm.box = 'bento/centos-7.2' | |
centos7.vm.network 'private_network', ip: '192.168.33.13' | |
centos7.vm.provider 'virtualbox' do |v| | |
v.name = 'ctl-centos7' | |
v.memory = 1024 | |
v.customize ["modifyvm", :id, "--ostype", "RedHat_64"] | |
end | |
centos7.vm.provision "shell", inline: <<-SHELL | |
yum install -y epel-release | |
yum install -y ansible | |
SHELL | |
end | |
##----------- | |
config.vm.define 'debian8' do |debian8| | |
debian8.vm.box = 'bento/debian-8.4' | |
debian8.vm.network 'private_network', ip: '192.168.33.100' | |
debian8.vm.provider 'virtualbox' do |v| | |
v.name = 'jessie' | |
v.memory = 1024 | |
v.customize ["modifyvm", :id, "--ostype", "Debian_64"] | |
end | |
end | |
config.vm.define 'ubuntu14' do |ubuntu14| | |
ubuntu14.vm.box = 'bento/ubuntu-14.04' | |
ubuntu14.vm.network 'private_network', ip: '192.168.33.101' | |
ubuntu14.vm.provider 'virtualbox' do |v| | |
v.name = 'trusty' | |
v.memory = 1024 | |
v.customize ["modifyvm", :id, "--ostype", "Ubuntu_64"] | |
end | |
end | |
config.vm.define 'centos6' do |centos6| | |
centos6.vm.box = 'bento/centos-6.7' | |
centos6.vm.network 'private_network', ip: '192.168.33.102' | |
centos6.vm.provider 'virtualbox' do |v| | |
v.name = 'centos6' | |
v.memory = 1024 | |
v.customize ["modifyvm", :id, "--ostype", "RedHat_64"] | |
end | |
end | |
config.vm.define 'centos7' do |centos7| | |
centos7.vm.box = 'bento/centos-7.2' | |
centos7.vm.network 'private_network', ip: '192.168.33.103' | |
centos7.vm.provider 'virtualbox' do |v| | |
v.name = 'centos7' | |
v.memory = 1024 | |
v.customize ["modifyvm", :id, "--ostype", "RedHat_64"] | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment