Aaand that's what I get for posting before Googling. This is easily done in the Vagrantfile itself, by using file provisioning:
https://www.vagrantup.com/docs/provisioning/file.html Sorry for the noise. On Thursday, August 16, 2018 at 12:09:44 PM UTC-4, [email protected] wrote: > > Hi there – > > I'm creating a Vagrantfile for a VM running Ubuntu. This Vagrantfile runs > a bootstrap.sh script, which installs various packages via apt-get. I keep > both of these files in a Git repository, for easy sharing with other > developers. > > Here's my challenge: in addition to installing the apt packages, I'd like > my bootstrap.sh to copy a few files onto the VM. (For example, I have a > custom makevhost.sh script which needs to be available on the VM.) > > What's the best way to do this, *without* putting the contents of > makevhost.sh inline in bootstrap.sh (in a cat command or similar)? > > My Vagrantfile also defines a synced folder, so I *could* put > makevhost.sh in that directory, so that it'll be accessible to guest > machine (and therefore accessible to bootstrap.sh) – but I'd prefer to > avoid that. > > Is there an established practice for accomplishing this? I'm sure it's a > common goal. > > 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/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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/b566fe84-67e9-4c75-83dd-a509ee165c82%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
