I have configured my vagrant virtual machine and I have the Provision profile that contains all necessary configs. Can I move those settings to the real machine? Official docs contain next phrase 'Vagrant - the command line utility for managing the lifecycle of virtual machines', so the vagrant profile is used only for configuring a virtual machine, right? (It can not be used for configuring real computer) If it can, could you describe the way to make it.
Asked
Active
Viewed 533 times
0
-
1If I understand correctly, basically you're saying you want to run the same provisioning locally that you did on your VM ? so its not about vagrant but about your provisioning. Can you run your provisionner locally ? I dont know which provisioning option you have selected but yes, it should be possible. – Frederic Henri Aug 25 '17 at 12:27
-
@FrédéricHenri, yes. – Kostya Vyrodov Aug 25 '17 at 13:03
-
so you'd better focus your question on the provisioner (ansible, puppet or something else) and how you can use the same provisioner script on your server. Provisioners are certainly not limited to vagrant VM and their goal is to configure real servers but you would need to provide details about the specific provisioning – Frederic Henri Aug 25 '17 at 13:18
-
@FrédéricHenri, so I have to use puppet and then I will able to configure a real server, right? Probably, I didn't understand well what is the purpose of the Vagrant. Now, I see that is used for the fast configuring a virtual machine. – Kostya Vyrodov Aug 25 '17 at 19:46
1 Answers
2
It's not possible in Vagrant itself.
You want to provision your host machine and for that I recommend using Ansible and you simply target localhost.
Inside Ansible you can still use shell commands if that's what you have used so far for your provisioning.
I've found an answer that follows this questions: Run command on the Ansible host
Another workaround is to use plugins made by community, such as:

Melcma
- 608
- 3
- 14