Last active
September 30, 2018 12:16
-
-
Save kazokmr/5a06f839cc3107741dc35d41ba84160a to your computer and use it in GitHub Desktop.
gitでdownloadしたMavenプロジェクトを実行する環境です。 ansibleのplaybookは、kazokmr/ansible-maven-envを利用します
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.box_check_update = false | |
config.vm.network "private_network", ip: "192.168.33.10" | |
config.vm.provider "virtualbox" do |vb| | |
# Customize the amount of memory on the VM: | |
vb.memory = "2048" | |
vb.cpus = "2" | |
end | |
config.vm.synced_folder "ansible-maven-env","/ansible",: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 /ansible/environment /ansible/mavenProjectEnv.yml | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment