what to do about a config that fails unless a config runs first

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

what to do about a config that fails unless a config runs first

Abagail Embree
I am trying to mount a directory from host into a rhel guest, but getting the addition that makes the mount possible can only happen during provisioning, when a bash script wgets the addition from inside the guest. is there any way to run provisioning mid-config? I'm trying to make all this happen inside a single config file, so that spawning an instance without having to run any other commands can be done by non-technical folks? I have tried:

inserting an inline script mid-config (this doesn't work, the script just gets added to the stuff that is supposed to happen during provisioning)
running arbitrary ruby in the config file, to see whether something complicated is possible (it isn't, seems like only vagrant-relevant commands actually run)
investigated the possibility of using triggers (idk how they work or whether they are a solution worth exploring for this problem)

any ideas?

--
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/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/468e40a0-ecba-4bc1-8098-7ea7f4567368%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: what to do about a config that fails unless a config runs first

Alvaro Miranda Aguilera
Hello

The best is to install the additions and repackage the box.

so the new box have virtualbox installed.

If you want to use the shared folder, the best is to have them working.

To create a vagrant box are multiples way.

manually
using vagrant package
or using packer.io

any question, please ask.

thanks
alvaro

On Fri, May 5, 2017 at 10:13 PM, Abagail Embree <[hidden email]> wrote:
I am trying to mount a directory from host into a rhel guest, but getting the addition that makes the mount possible can only happen during provisioning, when a bash script wgets the addition from inside the guest. is there any way to run provisioning mid-config? I'm trying to make all this happen inside a single config file, so that spawning an instance without having to run any other commands can be done by non-technical folks? I have tried:

inserting an inline script mid-config (this doesn't work, the script just gets added to the stuff that is supposed to happen during provisioning)
running arbitrary ruby in the config file, to see whether something complicated is possible (it isn't, seems like only vagrant-relevant commands actually run)
investigated the possibility of using triggers (idk how they work or whether they are a solution worth exploring for this problem)

any ideas?

--
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/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/468e40a0-ecba-4bc1-8098-7ea7f4567368%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
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/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ew5jS0aSpp8Uqd2fG5XvUckvCoU1%3D8%2B289RErhDLrKMag%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.