Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phinze/vagrant-host-shell
simple vagrant provisioner that executes commands on the host
https://github.com/phinze/vagrant-host-shell
Last synced: 2 months ago
JSON representation
simple vagrant provisioner that executes commands on the host
- Host: GitHub
- URL: https://github.com/phinze/vagrant-host-shell
- Owner: phinze
- License: mit
- Created: 2013-07-27T13:04:06.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-04-24T22:43:53.000Z (over 7 years ago)
- Last Synced: 2024-08-04T01:05:04.992Z (5 months ago)
- Language: Ruby
- Size: 9.77 KB
- Stars: 114
- Watchers: 7
- Forks: 18
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-vagrant - vagrant-host-shell - a vagrant provisioner to run commands on the host when a VM boots. (Notable plugins)
README
# vagrant-host-shell plugin
a vagrant provisioner to run commands on the host when a VM boots.
simple example based on question asked [on vagrant mailing list](https://groups.google.com/forum/#!topic/vagrant-up/CsNx-FErplY)
## example usage
Install as a plugin:
```
vagrant plugin install vagrant-host-shell
```Add this to `Vagrantfile`:
```ruby
config.vm.provision :host_shell do |host_shell|
host_shell.inline = 'touch /tmp/hostshell-works && echo hello from the host && hostname 1>&2'
end
```Run `vagrant up` (or `vagrant provision` if machine is already running.)
Observe that `/tmp/hostshell-works` is present on your host, and that the provisioner output:
```
[stdout] hello from the host
[stderr] (your host's hostname)
```