Commit Graph

27 Commits

Author SHA1 Message Date
Megan Marsh 0f6d1beccf add an extra string array to the Prepare() return values in the builder interfaces; this sets up the ability for builders to give the provisioners custom user-accessible build-time variables. 2019-12-16 21:23:05 -08:00
Megan Marsh 39fd462b56 change all provision func signatures to use map[string]interface{} 2019-12-12 15:38:32 -08:00
Megan Marsh 0ca7c9f397 fix tests 2019-12-11 16:29:35 -08:00
Adrien Delorme c7ce4d598e change Provisioner to be passed a context for cancellation 2019-04-03 15:55:54 +02:00
Adrien Delorme 9f82b75e57 Use the hashicorp/go-getter to download files
* removed packer.Cache and references since packer.Cache is never used except in the download step. The download step now uses the new func packer.CachePath(targetPath) for this, the behavior is the same.
* removed download code from packer that was reimplemented into the go-getter library: progress bar, http download restart, checksuming from file, skip already downloaded files, symlinking, make a download cancellable by context.
* on windows if packer is running without symlinking rights and we are getting a local file, the file will be copied instead to avoid errors.
* added unit tests for step_download that are now CI tested on windows, mac & linux.
* files are now downloaded under cache dir `sha1(filename + "?checksum=" + checksum) + file_extension`
* since the output dir is based on the source url and the checksum, when the checksum fails, the file is auto deleted.
* a download file is protected and locked by a file lock,
* updated docs
* updated go modules and vendors
2019-03-13 12:11:58 +01:00
Adrien Delorme 5b66069da0 tests: remove Ui stubs to use packer.NoopUi to deduplicate code 2018-09-06 15:53:59 +02:00
Adrien Delorme 61480f41dc fix some go vet issues in tests ( composite literal uses unkeyed fields ) 2018-08-31 11:54:12 +02:00
localghost 263a3c6910 Include some of the refactoring reverted by previous revert commit. 2018-05-26 21:59:43 +02:00
localghost 46a1c5d945 Revert "Unify handling PlaybookFile and PlaybookFiles."
This reverts commit 81db142c8a.
2018-05-26 21:58:08 +02:00
localghost 6c7aa724eb Fix tests after merging with master. 2018-05-16 22:43:30 +02:00
localghost c33ca8ce64 Merge remote-tracking branch 'origin/master' into ansible_local_playbook_files_update 2018-05-16 22:14:12 +02:00
localghost 81db142c8a Unify handling PlaybookFile and PlaybookFiles. 2018-05-16 21:54:19 +02:00
Krzysztof Wilczynski 10370adbab
ansible-local: Add ability to clean staging directory.
Signed-off-by: Krzysztof Wilczynski <kw@linux.com>
2017-11-21 21:09:01 +01:00
localghost daca0c2efe Remove accidental dependency to moby's ioutils package. 2017-07-10 22:05:42 +02:00
localghost 079cbc263f Add tests for playbook_files with playbook_dir. 2017-07-10 21:58:46 +02:00
Zbigniew Kostrzewa 33ae9cb2bb Add test for playbook_files using docker builder. 2017-07-10 08:19:29 +02:00
localghost 9ea6313b68 Fix playbook_files test on Windows. 2017-07-06 21:28:27 +02:00
localghost f682045345 Test for ansible-local playbook_files with mocked Communicator. 2017-07-06 06:44:03 +02:00
Zbigniew Kostrzewa 41d0adfbdd Add playbook_files to execute multiple ansible playbooks. 2017-07-01 23:21:07 +02:00
Matthew Hooker 81522dced0
move packer to hashicorp 2017-04-04 13:39:01 -07:00
Matthew Hooker a836268490
fix test on windows 2017-02-06 11:29:39 -08:00
Matthew Hooker 0f445dff07
fix tests 2017-02-03 15:03:19 -08:00
Joe Gornick 6d56def162 Add inventory_file option to Ansible provisioner. 2014-04-04 14:58:48 -05:00
Bernard McKeever 458d90c71d provisioner/ansible: support {group,host}_vars
ansible looks for group and host vars directories as well as playbooks
this revision to the provisioner uploads those as well.
squashed to a single commit by strcrzy.
2014-02-02 09:34:41 -08:00
Jake Good b76a116823 Fix Ansible-local provisioner configuration check for 'playbook_paths' as it was checking for files, not paths 2013-12-12 14:13:23 -06:00
Kelsey Hightower e7b7d71f16 Add tests for ansible provisioner default settings 2013-09-29 15:44:21 -07:00
Kelsey Hightower 365f356a0b Add tests for ansible-local provisioner 2013-09-29 14:54:49 -07:00