|
4 | 4 | VAGRANTFILE_API_VERSION = '2'
|
5 | 5 | VIRTUAL_MACHINES = {
|
6 | 6 | :ubuntu14 => {
|
7 |
| - :hostname => 'ubuntu14', |
| 7 | + :hostname => 'ansible-st2-ubuntu14', |
8 | 8 | :box => 'ubuntu/trusty64',
|
9 | 9 | },
|
10 | 10 | :ubuntu16 => {
|
11 |
| - :hostname => 'ubuntu16', |
| 11 | + :hostname => 'ansible-st2-ubuntu16', |
12 | 12 | :box => 'ubuntu/xenial64',
|
13 | 13 | },
|
14 | 14 | :centos6 => {
|
15 |
| - :hostname => 'centos6', |
| 15 | + :hostname => 'ansible-st2-centos6', |
16 | 16 | :box => 'centos/6',
|
17 | 17 | },
|
18 | 18 | :centos7 => {
|
19 |
| - :hostname => 'centos7', |
| 19 | + :hostname => 'ansible-st2-centos7', |
20 | 20 | :box => 'centos/7',
|
21 | 21 | },
|
22 | 22 | }
|
@@ -50,18 +50,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
50 | 50 | vm_config.vm.provision :hostmanager
|
51 | 51 | end
|
52 | 52 |
|
53 |
| - if vm_config.vm.hostname.include? "ubuntu" |
54 |
| - # Install Ansible native packages so the Ansible provisioner will work on systems |
55 |
| - # without Python 2.7 (i.e. Xenial) |
56 |
| - vm_config.vm.provision "shell", |
57 |
| - inline: "sudo apt-add-repository -y ppa:ansible/ansible; sudo apt-get update; sudo apt-get install -y ansible" |
58 |
| - end |
59 |
| - if vm_config.vm.hostname.include? "centos" |
60 |
| - vm_config.vm.provision "shell", |
61 |
| - inline: "sudo yum -y install epel-release; sudo yum -y install ansible git" |
62 |
| - end |
63 |
| - |
64 |
| - vm_config.vm.provision :ansible do |ansible| |
| 53 | + vm_config.vm.provision :ansible_local do |ansible| |
| 54 | + ansible.install = true |
65 | 55 | ansible.playbook = "stackstorm.yml"
|
66 | 56 | end
|
67 | 57 | end
|
|
0 commit comments