Created
September 23, 2018 14:33
-
-
Save kazokmr/9da50fcb81de9d8c86d9c787106737e2 to your computer and use it in GitHub Desktop.
Template of my default vagrantfile
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| | |
config.vm.box = "centos/7" | |
config.vm.hostname = "hostname" | |
config.vm.network "private_network", ip: "192.168.33.10" | |
config.vm.provider "virtualbox" do |vb| | |
vb.memory = "4096" | |
vb.cpus = "2" | |
end | |
config.vm.synced_folder "playbook","/playbook",:mount_options => ['dmode=775','fmode=664'] | |
config.vm.provision "shell", inline: $script | |
end | |
$script = <<END | |
if ! [`which ansible`]; then | |
yum -y install epel-release | |
yum -y install ansible | |
fi | |
ansible-playbook -i /playbook/hosts /playbook/site.yml | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment