This repository has been archived by the owner on Jun 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
56 lines (46 loc) · 1.54 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# -*- mode: ruby -*-
# vi: set ft=ruby :
$provisionning = <<-PROVISIONNING
# Installing tools
sudo yum -y install epel-release
sudo yum install -y curl dos2unix git make mlocate nmap strace tar tee tree unzip vim
sudo updatedb
# Installing Docker
sudo curl -fsSL get.docker.com | bash
sudo systemctl start docker
sudo systemctl enable docker
sudo usermod -a -G docker vagrant
# Need python >= 3.5. And gcc is required by some packages installed by pip
sudo yum -y install https://dl.iuscommunity.org/pub/ius/stable/CentOS/7/x86_64/ius-release-1.0-15.ius.centos7.noarch.rpm
sudo yum -y install python36u python36u-pip python36u-devel gcc
sudo pip3.6 install --upgrade pip ansible docker docker-compose molecule
# Disabling SELinux
sudo setenforce 0
sudo sed -i 's;SELINUX=enforcing;SELINUX=disabled;' /etc/selinux/config
echo
echo "All set. Now just do"
echo
echo " vagrant reload"
echo " vagrant ssh"
echo " cd /vagrant"
echo " molecule test"
echo
echo " "
PROVISIONNING
Vagrant.configure(2) do |config|
config.vm.box = "centos/7"
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
vb.cpus = "1"
end
config.vm.hostname = 'ansible.vagrant'
if Vagrant.has_plugin?("vagrant-hostmanager")
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.manage_guest = true
config.hostmanager.ignore_private_ip = false
config.hostmanager.include_offline = true
end
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"
config.vm.provision "shell", inline: $provisionning
end