From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/vagrant/push%2Flocal-exec.html | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 devdocs/vagrant/push%2Flocal-exec.html (limited to 'devdocs/vagrant/push%2Flocal-exec.html') diff --git a/devdocs/vagrant/push%2Flocal-exec.html b/devdocs/vagrant/push%2Flocal-exec.html new file mode 100644 index 00000000..e9df2f6f --- /dev/null +++ b/devdocs/vagrant/push%2Flocal-exec.html @@ -0,0 +1,28 @@ +

Vagrant Push

Local Exec Strategy

The Vagrant Push Local Exec strategy allows the user to invoke an arbitrary shell command or script as part of a push.

Warning: The Vagrant Push Local Exec strategy does not perform any validation on the correctness of the shell script.

+

The Vagrant Push Local Exec strategy supports the following configuration options:

Please note - only one of the script and inline options may be specified in a single push definition.

Usage

The Vagrant Push Local Exec strategy is defined in the Vagrantfile using the local-exec key:

Remote path:

config.push.define "local-exec" do |push|
+  push.inline = <<-SCRIPT
+    scp -r . server:/var/www/website
+  SCRIPT
+end
+
+

Local path:

config.push.define "local-exec" do |push|
+  push.inline = <<-SCRIPT
+    cp -r . /var/www/website
+  SCRIPT
+end
+
+

For more complicated scripts, you may store them in a separate file and read them from the Vagrantfile like so:

config.push.define "local-exec" do |push|
+  push.script = "my-script.sh"
+end
+
+

And then invoke the push with Vagrant:

$ vagrant push
+
+

Script Arguments

Refer to Shell Provisioner.

+

+ © 2010–2018 Mitchell Hashimoto
Licensed under the MPL 2.0 License.
+ https://www.vagrantup.com/docs/push/local-exec.html +

+
-- cgit v1.2.3