Skip to content

Commit 66f65af

Browse files
authored
Merge pull request #118 from StackStorm/fix/vagrantfile
Vagrantfile fixes & enhancements
2 parents 054b074 + f13b321 commit 66f65af

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

Vagrantfile

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
VAGRANTFILE_API_VERSION = '2'
55
VIRTUAL_MACHINES = {
66
:ubuntu14 => {
7-
:hostname => 'ubuntu14',
7+
:hostname => 'ansible-st2-ubuntu14',
88
:box => 'ubuntu/trusty64',
99
},
1010
:ubuntu16 => {
11-
:hostname => 'ubuntu16',
11+
:hostname => 'ansible-st2-ubuntu16',
1212
:box => 'ubuntu/xenial64',
1313
},
1414
:centos6 => {
15-
:hostname => 'centos6',
15+
:hostname => 'ansible-st2-centos6',
1616
:box => 'centos/6',
1717
},
1818
:centos7 => {
19-
:hostname => 'centos7',
19+
:hostname => 'ansible-st2-centos7',
2020
:box => 'centos/7',
2121
},
2222
}
@@ -50,18 +50,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
5050
vm_config.vm.provision :hostmanager
5151
end
5252

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
6555
ansible.playbook = "stackstorm.yml"
6656
end
6757
end

0 commit comments

Comments
 (0)