From aa60fe60318cc13a828b0894fe697b3879f77f97 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Fri, 14 Nov 2014 15:55:14 -0500 Subject: [PATCH] Add example of reading the file --- website/docs/source/v2/push/local-exec.html.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/website/docs/source/v2/push/local-exec.html.md b/website/docs/source/v2/push/local-exec.html.md index b5eb0d487..4e3727f85 100644 --- a/website/docs/source/v2/push/local-exec.html.md +++ b/website/docs/source/v2/push/local-exec.html.md @@ -39,6 +39,15 @@ config.push.define "local-exec" do |push| end ``` +For more complicated scripts, you may store them in a separate file and read +them from the `Vagrantfile` like so: + +```ruby +config.push.define "local-exec" do |push| + push.command = File.read("my-script.sh") +end +``` + And then invoke the push with Vagrant: ```shell