if index == NODE_COUNT then config.vm.provision "ansible" do |ansible| #ansible.limit = "all" ansible.playbook = "./provisioners/ansible/mainplus.yml" ansible.inventory_path = "./provisioners/ansible/inventory" end end
You're probably looking for above. Incidentally, the language you're writing this in is Ruby. if you want to see output of any kind you can use puts 'some message = ', index, NODE_COUNT which would output something like: some message = 0, 0 This will help in your debugging. Lastly, as a FYI, in programming, variable names with ALL_CAPS are typically reserved for constants (variables that are immutable i.e. don't change) or used for Environment variables (e.g. $HOME). While what you wrote works, it might be confusing to someone to see some index count in ALL CAPS changing on every iteration. On Wednesday, August 12, 2020 at 9:34:34 AM UTC-4, jason.wi...@gmail.com wrote: > > Hey folks. > Looking for some help on how to get my setup working correctly. > I can use ansible AFTER vagrant up is working, by running: > > vagrant ssh-config >> ~/.ssh/config > Now can read the file and SSH into the host and run the playbooks. > > How does that work when i am running ansilbe within vagrant up? Do you > need to add the hosts into ~/.ssh/config ahead of time? > Just looking for help on how to get this working properly > > Thanks > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/hashicorp/vagrant/issues Discuss: https://discuss.hashicorp.com/c/vagrant/24 --- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/dfda8c6a-1da5-454e-ad98-7834fc77ecdco%40googlegroups.com.