Reputation: 951
Is there a way for next scenario as I am planing to setup lab environment:
Question: Is there any way that this setup will work to create new environments via CentOS as Vagrant-Ansible manage servers?
------------------------edit---------------------- Thank you for your answer. I try to setup as I mentioned above without luck. I am new user of Vagrant and Ansible so I am having trouble to make it work. I setup Linux system on VB, install vagrant, install Ansible but when I hit 'vagrant up' I am getting error that "No usable default provider could be found for your". I am following documentation form official sites but can;t make it work. Then I try to install VirtualBox inside Linux system and now it is working but defined machines with Vagrant installs inside Linux machine (where are Vagrant and Ansible installed) and not on Host VirtualBox. Any advice? I hope it is clearer now. Thanks
Upvotes: 1
Views: 937
Reputation: 461
I have had some success in using a Windows Ansible Host and running using Vagrant with this host.
I have scripted how to setup Win Ansible and the shims at: https://github.com/taliesins/win-ansible
The important bit is to setup shims that call bash scripts running under cygwin.
Another important thing to consider is, is that it is probably better to generate your own inventory file (put it in the vagrant file before you create VMs) then to use an auto-generated inventory file.
If you environment is not simple consider not using Vagrant provisioner for Ansible, but rather call Ansible via command line at the end of the vagrant file (after you have created the VMs).
Upvotes: 0