Skip to content

Commit a77f510

Browse files
committed
Removed all ansible_local related statements
1 parent bac0dba commit a77f510

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

Vagrantfile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ Vagrant.configure("2") do |config|
22

33
# Define first Kafka node
44
config.vm.define "kafka_node_01" do |kafka_node_01|
5-
kafka_node_01.vm.synced_folder "./vagrant", "/vagrant"
5+
# synced_folder only used in ansible_local setting
6+
# kafka_node_01.vm.synced_folder "./vagrant", "/vagrant"
67
kafka_node_01.vm.box = "ol7-latest"
78
kafka_node_01.vm.hostname = 'kafka-node-01'
89
kafka_node_01.vm.box_url = "https://yum.oracle.com/boxes/oraclelinux/latest/ol7-latest.box"
@@ -27,7 +28,8 @@ Vagrant.configure("2") do |config|
2728

2829
# Define Kafka worker node
2930
config.vm.define "kafka_workernode_01" do |kafka_workernode_01|
30-
kafka_workernode_01.vm.synced_folder "./vagrant", "/vagrant"
31+
# synced_folder only used in ansible_local setting
32+
# kafka_workernode_01.vm.synced_folder "./vagrant", "/vagrant"
3133
kafka_workernode_01.vm.box = "ol7-latest"
3234
kafka_workernode_01.vm.hostname = 'kafka-workernode-01'
3335
kafka_workernode_01.vm.box_url = "https://yum.oracle.com/boxes/oraclelinux/latest/ol7-latest.box"
@@ -44,18 +46,15 @@ Vagrant.configure("2") do |config|
4446
end # End of config.vm.define "kafka_workernode_01"
4547

4648

47-
# Set auto_update to false
48-
# This will not automatically update the guest additions on VM boot
49-
# Set to "true" if you want auto-updates
50-
# config.vbguest.auto_update = false
51-
5249
# Run the same playbook on all hosts
5350
# :vars section provided as example on passing variables to
5451
# ansible in possible future versions
55-
config.vm.provision "ansible_local" do |ansible|
52+
config.vm.provision "ansible" do |ansible|
5653
ansible.verbose = "v"
57-
ansible.playbook = "ansible-playbook.yml"
54+
ansible.playbook = "vagrant/ansible-playbook.yml"
55+
ansible.limit = "all"
5856
ansible.groups = {
57+
"all" => ["kafka_node_01", "kafka_workernode_01"],
5958
"kafkabrokers" => ["kafka_node_01", "kafka_workernode_01"],
6059
"kafkabrokers:vars" => {"variable1" => "example1",
6160
"variable2" => "example2"}

0 commit comments

Comments
 (0)