Skip to content

Instantly share code, notes, and snippets.

@kishida
Created May 3, 2016 10:52
Show Gist options
  • Save kishida/a748856b26145dc3404f97bbd659f325 to your computer and use it in GitHub Desktop.
Save kishida/a748856b26145dc3404f97bbd659f325 to your computer and use it in GitHub Desktop.
Vagrant、Shellでansible
Vagrant.configure("2") do |conf|
conf.vm.box = "bento/centos-7.1"
conf.vm.define "console", primary: true do |host|
host.vm.network "private_network", ip: "192.168.34.21"
host.vm.provision "shell", inline: <<-SHELL
yum -y install epel-release
yum -y install ansible
SHELL
end
conf.vm.define "target" do |host|
host.vm.network "private_network", ip: "192.168.34.22"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment