-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
50 lines (41 loc) · 1.42 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.hostname = "vmname.example.com"
config.vm.box = "centos/7"
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.ssh.forward_agent = true
config.vm.provider "libvirt" do |libvirt|
libvirt.driver = "kvm"
libvirt.host = "localhost"
libvirt.connect_via_ssh = true
libvirt.username = "root"
libvirt.storage_pool_name = "default"
libvirt.memory = 6144
libvirt.cpus = 3
end
config.vm.provider "openstack" do |os, override|
override.ssh.username = "centos"
override.ssh.private_key_path = "~/.ssh/id_dsa"
override.ssh.pty = true
# Specify OpenStack authentication information
os.openstack_auth_url = ENV['OS_AUTH_URL'] + "tokens"
os.username = ENV['OS_USERNAME']
os.password = ENV['OS_PASSWORD']
os.tenant_name = ENV['OS_TENANT_NAME']
# Specify instance information
os.server_name = "vagrant-test"
os.flavor = "m1.large"
os.image = "centos-7-cloud"
os.floating_ip_pool = "external"
os.networks = ["default-network-amoralej-ff834"]
os.keypair_name = "amoralej"
end
config.vm.provision "file", source: "~/.gitconfig", destination: ".gitconfig"
config.vm.provision "file", source: "~/.vimrc", destination: ".vimrc"
config.vm.provision "ansible" do |ansible|
ansible.verbose = true
ansible.playbook = "playbook.yml"
end
end