The title says it all.I'm using Vagrant boxes for several purposes, and in most cases the prepared boxes I can download are totally sufficient.  However, sometimes I need one or a few additional packages installed on the boxfor regular activities, not one-time use.For example, I have a Vagrant box on my Mac (Linux guest on Mac host) which I primarily want for easy access to built-in Linux documentation (man pages, info pages, etc.)  However, the box I am using doesn't have the man package installed when I first vagrant up.If I just install the package manually, it will only last until the next vagrant destroy.  If I use vagrant halt instead, I'll build up cruft on my system, which defeats the purpose of using vagrant as opposed to simply a Virtual Box.I know the general answer to this is vagrant provisioning, and it could be as simple as a script with a single command sudo yum install man.  (Although actually I don't even know specifically how to do that.)  However, rather than downloading the man package and all dependencies each time I start the vagrant box, I would rather download those packages once, store them on my host system, and load them into the vm each time I vagrant up.I have already run sudo yum install man --downloadonly on the guest, to get the packages I need, and sudo cp -r /var/cache/yum/x86_64/6/base/packages/ /vagrant/ to put the package files on my host.So my question is really twofold:What is the vagrant provisioning syntax to use for: (a) calling a script (to be stored in the same directory as the Vagrantfile), or (b) if possible, embedding a single command in the Vagrantfile (such as sudo yum install man)?How can I give yum the option flags needed to install a package from a local directory (/vagrant) and to install any needed dependencies from that same local directory rather than from an online repository?In combination, these two data will answer the title question.  Thanks for reading this far!  :)
How to use Vagrant provisioning to install a package without download?
linux;yum;virtual machine;vagrant
For example, I have a Vagrant box on my Mac (Linux guest on Mac host)It would be interesting to know which distribution this is... Given that you're trying to use yum I imagine this is some RH/CentOS/.. stuff?which I primarily want for easy access to built-in Linux documentation (man pages, info pages, etc.) However, the box I am using doesn't have the man package installed when I first vagrant up.I don't know any distribution that doesn't install manby default.If I were you, I'd use one of the official boxes on ATLAS, Debian comes to mind: https://vagrantcloud.com/debian/Reply to Q1Add this to your vagrantfile:$script = <<SCRIPTecho I am provisioning...date > /etc/vagrant_provisioned_atSCRIPTVagrant.configure(2) do |config|  config.vm.provision shell, inline: $scriptendExample taken fromhttp://docs.vagrantup.com/v2/provisioning/shell.html#inline-scriptsThis would execute the script at the top, resulting in the creation of /etc/vagrant_provisioned_atFurther adapted to your question:$script = <<SCRIPTyum install manSCRIPTVagrant.configure(2) do |config|  config.vm.provision shell, inline: $scriptendThe provisioning script is run as UID0, so no need for sudo.Reply to Q2I'm a Debian user and as such RedHat illiterate ;-)IMHO this would be rpm -hiv <filename>(i =install, h = hashmarks, v = verbose).Related manpage