Commit Graph

78 Commits

Author SHA1 Message Date
Matthew Hooker ecad3348b3
rephrase log message. 2017-10-26 10:41:49 -07:00
Ohad Basan 33b85b0130 Add suggestion for "expected_disconnect" option if disconnection occurs 2017-10-26 19:53:48 +03:00
Matthew Hooker 75111e49e9
remove convoluted pointer logic 2017-10-11 23:35:24 -07:00
Megan Marsh 401c718a59 set default for ExpectDisconnect to false 2017-08-24 14:46:52 -07:00
Matthew Hooker 56979a1974
Revert "Universally provide POSIX semantics for the `shell` provisioner."
This reverts commit 1ba7f9cc20.
2017-06-21 16:11:47 -07:00
Sean Chittenden 1ba7f9cc20
Universally provide POSIX semantics for the `shell` provisioner.
All platforms everywhere have `env(1)` available, leverage it
accordingly.

Improves on: #2343
2017-05-20 09:28:02 -07:00
Matthew Hooker 81522dced0
move packer to hashicorp 2017-04-04 13:39:01 -07:00
Matthew Hooker 0149f679de
Print instead of Printf with no dynamic first variable. 2017-03-28 20:36:20 -07:00
DanHam 0cbb4ff30c provisioner/shell: Align gen of flattened env vars with powershell/win-shell
* Move code to generate quoted flattened env vars to separate function
* Fix: generate flattened env vars once per provisioner not once per script
2017-01-23 12:10:46 +00:00
Matthew Hooker 4e6a44f5f1
append will resize 2017-01-17 17:21:14 -08:00
Matthew Hooker 480398c3d2
only set PACKER_HTTP_ADDR if a server is listening 2017-01-17 17:17:36 -08:00
Matthew Hooker d2e59e4e92
set PACKER_HTTP_ADDR env var when available.
If using a builder that has an http server set up for file transfer,
expose the connection info to the shell provisioner through the environment
variable PACKER_HTTP_ADDR.

Closes #2869
2017-01-16 23:19:52 -08:00
Matthew Hooker 12176b6afc
provisioner/shell: treat disconnects as retryable. 2016-11-22 15:59:40 -08:00
Matthew Hooker 892d5e82c9 expect_disconnect option
provisioner/shell: Adds option to fail if the remote server disconnects
us.
2016-10-21 11:39:03 -07:00
Ian Duffy 7e653370b7 Seperate remote_path into remote_folder and remote_script. (#3462)
Commonly /tmp is set as noexec, as a result packer scripts
fail to run. In order to get around this one can set a
remote_path, whoever, remote path requires full filename
and path.

By making remote_path a combination of
remote_folder/remote_script we can change remote_folder
and keep the default script_nnn.sh

Signed-off-by: Ian Duffy <ian@ianduffy.ie>
2016-04-26 16:04:29 -07:00
Chris Bednarski 1f6749096a Restore missing interpolation after merging ansible remote; fixes #3138 2016-02-01 13:28:49 -08:00
Chris Bednarski 15f99a4aee Merge branch 'ansible-provisioner' of https://github.com/bhcleek/packer into f-ansible 2016-01-28 15:16:54 -08:00
David Zanetti 2668747c71 Rename noclean shell option to skip_clean, per pull feedback 2015-11-19 16:02:45 +13:00
David Zanetti 3d23655f2f Add "noclean" boolean to shell provisioner. This stops the provisioner from
attempting to remove helper scripts it creates. As noted on #2803 this can
be useful when deleting the build user from an AMI or other template.
2015-11-16 16:37:09 +13:00
Billie H. Cleek cc8ca3098e add ansible provisioner 2015-10-31 10:39:33 -07:00
Mitchell Hashimoto 7c8e86c9c5 provisioner/*: fix interpolation context 2015-06-22 12:26:54 -07:00
Mitchell Hashimoto 6ec428cc38 provisioner/shell: retry file delete [GH-2286] 2015-06-21 19:53:43 -07:00
Mitchell Hashimoto 4463083a60 provisioner/shell: randomize default script name 2015-06-18 10:38:23 +02:00
Mitchell Hashimoto 6c80228661 provisioner/shell: missing error arg 2015-06-15 15:11:08 -07:00
Mitchell Hashimoto a235419c7d provisioner/shell: remove file after exec [GH-1536] 2015-06-15 15:02:59 -07:00
Mitchell Hashimoto c549fce85e provisioner/shell: escape single quotes [GH-2067] 2015-06-13 14:11:20 -04:00
Mitchell Hashimoto b28f946be9 Merge pull request #2210 from mitchellh/b-set-e
provisioner/shell: set -e for inline [GH-2069]
2015-06-11 17:19:43 -04:00
Mitchell Hashimoto 3ed73852be provisioner/shell: set -e on the shebang itself 2015-06-11 17:19:23 -04:00
Mitchell Hashimoto a995df352e provisioner/shell: uploaded script should be 0755 [GH-1708] 2015-06-10 21:18:46 -07:00
Mitchell Hashimoto 952077ccb0 provisioner/shell: set -e for inline [GH-2069] 2015-06-10 21:02:22 -07:00
Mitchell Hashimoto 2b4df93f2f provisioner/*: interpolation 2015-05-27 14:50:20 -07:00
Mitchell Hashimoto 3eda0f33a0 provisioner/shell: quote PACKER env vars [GH-1565] 2014-10-28 08:23:18 -07:00
Josh Frye 5835ca42b4 Move quoting to else block only for valid vars. Add test case. 2014-10-14 14:20:36 -07:00
Josh Frye a667282e00 Single quote env var values. 2014-10-14 13:03:14 -07:00
Ross Smith II d92179847d provisioner/file: set file/directory permissions
fixes #1064
2014-05-09 21:03:35 -07:00
Mitchell Hashimoto 9365b879c0 provisioner/shell: chmod uploaded file to 0777 [GH-994] 2014-04-26 20:20:47 -07:00
Mitchell Hashimoto ec41edf558 provisioner/shell: Split on first equal for env vars [GH-1045] 2014-04-26 14:51:56 -07:00
Jason A. Beranek b3d76b7945 provisioner/shell: fix provisioner to use UnixReader [GH-477]
Packer was using the original file reader when uploading, instead of the UnixReader /cc @mitchellh
2013-09-30 23:54:54 -05:00
Mitchell Hashimoto abbac36796 provisioner/shell: convert windows line endings to Unix [GH-277] 2013-09-20 10:22:43 -07:00
Mitchell Hashimoto 28bf6122bd provisioner/*: implement Cancel 2013-08-30 23:23:36 -07:00
Mitchell Hashimoto a46c7afcf7 provisioner/shell: retry the upload if command fails as well
This improves reboot handling robustness
2013-08-23 11:21:20 -07:00
Mitchell Hashimoto 717746ce4f provisioner/shell: retry uploads if reboot [GH-282] 2013-08-19 23:02:06 -07:00
Mitchell Hashimoto 64d87bfaf3 *: switch to packer ConfigTemplate 2013-08-15 19:17:23 -07:00
Mitchell Hashimoto 21f92715c0 provisioner/shell: start_retry_timeout for reboot handling [GH-260] 2013-08-12 15:49:55 -07:00
Mitchell Hashimoto 332bdf6edc builder/*, provisioner/*: set user vars 2013-08-09 15:57:08 -07:00
Mitchell Hashimoto 3f1af409e2 provisioner/shell: tests passing and compiling 2013-08-08 17:25:26 -07:00
Mitchell Hashimoto f4b0e2248f provisioner/shell: convert to latest template stuff 2013-08-08 17:25:26 -07:00
Rafael Garcia 25af1c8bd4 provisioner/shell: state of the art config decoding 2013-08-06 15:30:36 -07:00
Mitchell Hashimoto b64a2532f4 provisioner/shell: use StartWithUi 2013-07-23 22:44:32 -05:00
Mitchell Hashimoto 0b5f4d9d17 provisioner/shell: make build name and builder type env vars [GH-154] 2013-07-15 10:07:49 +09:00