Commit Graph

906 Commits (774a168957f14cedc2dd67b9bb2ea329fcd5d294)

Author SHA1 Message Date
Adrien Delorme e62aba3788 allow to set ExecutionPolicy to none for powershell provisioner
7 years ago
Adrien Delorme e96409954a add execution policy type and use it to default the powershell cmd
7 years ago
Aaron Walker 85b8a654b0 only sets default value for chef license when installing chef and the install command is not set
7 years ago
Paul Meyer 814665fddd Check error returned from retry.Config.Run()
7 years ago
Paul Meyer ec14ab4875 Add unit test to find issue #7655
7 years ago
Aaron Walker dfc5e5cf94 adds support for accepting the chef license
7 years ago
Adrien Delorme d72040f4fa move retry code into the common/retry pkg and make retry context aware
7 years ago
Adrien Delorme 2b06d74019 add a sleep provisioner
7 years ago
Adrien Delorme f555e7a9f2 allow a provisioner to timeout
7 years ago
Adrien Delorme a81abd297b Merge remote-tracking branch 'origin/master' into context_provisioner
7 years ago
Adrien Delorme c4f3dccc14 rename interpolation context from ctx to ictx and contexts to ctx to avoid conflicts
7 years ago
Adrien Delorme 82c4b76639 [Builder|Build|PostProcessor|Provisioner|Hook]Server: context cancel using a RPC cancel method
7 years ago
Adrien Delorme c7ce4d598e change Provisioner to be passed a context for cancellation
7 years ago
Megan Marsh 0e6c779a88 allow user to access env_var_format in windows_shell call
7 years ago
Adrien Delorme 5a6dffde9a use port as ints
7 years ago
Adrien Delorme a77ce59e36 Update provisioner_test.go
7 years ago
Adrien Delorme 72e5ae9ddc use ValidExitCode in provisioners windows-shell, powershell and shell
7 years ago
Adrien Delorme 30a65c858a regroup shell provisioner params into a common struct
7 years ago
Adrien Delorme 8fea9439f8 windows-shell provisioner: allow to pass ValidExitCodes
7 years ago
Adrien Delorme 9f82b75e57 Use the hashicorp/go-getter to download files
7 years ago
xinau b449af84ee moved concurrency-safe ui code to packer/ui.go
7 years ago
xinau ae59b81f44 added check for docker backend
7 years ago
xinau 36c1e8d838 moved adapter to common package
7 years ago
xinau 8526244285 changed local_port to uint representation
7 years ago
xinau c207451f7e Merge branch 'master' of https://github.com/hashicorp/packer into packer-provisioner-inspec
7 years ago
pauloj95 b1fffee614
Update guest_commands_test.go
7 years ago
pauloj95 b4d1c77cc0
Update guest_commands_test.go
7 years ago
pauloj95 d7b93aa343
add force to guestcommands test too
7 years ago
pauloj95 8d8b880ac4
add force to powershell move command
7 years ago
Rickard von Essen 52b55fb899
ansible: change local_port to uint instead of string
7 years ago
xinau f5b13e3cb5 added inspec.io provisioner
7 years ago
Adrien Delorme 9f7b4ffc17
Merge branch 'master' into pr/6950
7 years ago
Megan Marsh 5c2da6b816 fix destination pathing so that it doesnt break on windows
7 years ago
Megan Marsh 70c6fcb824
Merge pull request #7078 from aspectcapital/issue-5478
7 years ago
mr-karan 01cdd18fd3 feat(provisioner/ansible): Provide extra SSH args
7 years ago
Matt Dainty 451709b956 Elevated support for chef-client provisioner
7 years ago
Megan Marsh d5854a9574 add option to test registry for certain keys to make sure windows is done with a reboot cycle
7 years ago
Adrien Delorme b7222d1f56 Add tmp package that offers Dir & File funcs
7 years ago
Matt Dainty 19bd28cd72 Fix/add tests
7 years ago
Matt Dainty 2e4b00f59d Refactor powershell provisioner
7 years ago
Matt Dainty a42f8fac4d Elevated support for puppet-masterless provisioner
7 years ago
Adrien Delorme 2283efff79
Merge pull request #7071 from aspectcapital/ignore-pending-reboots
7 years ago
Matt Dainty 0192289d68 Drop exit code 1717
7 years ago
Matt Dainty 11be4ffc4b Attempt at generalising elevated support
7 years ago
Megan Marsh e69391f28b save users some bash scripting by exposing IP and port separately as well as together
7 years ago
Matt Dainty a7b407eab6 Naive support for elevated support for puppet-server provisioner
7 years ago
Matt Dainty 5fed453047 Ignore an already-scheduled reboot
7 years ago
Megan Marsh fa6eb3fdea reverts 406bf9c4aad7c925c3f5a837fe7f9c71169af098; this was incorrect interpretation of the intent of the inventoryDirectory template option
7 years ago
Megan Marsh 8a7ec456f1 use error groups so we can return errors
8 years ago
Megan Marsh e6477d13fb fix empty return
8 years ago
Megan Marsh a93721c54d add disable option to breakpoint provisioner
8 years ago
Megan Marsh ba25e68fe0 add a new breakpoint provisioner
8 years ago
Matt Dainty 412119c27e Fix powershell provisioner tests
8 years ago
Matt Dainty 3b519acebc Allow Powershell provisioner to use service accounts
8 years ago
Adrien Delorme 56fd98552e
removed space
8 years ago
Mark Meyer 31afd1c2f8 Add PauseAfter option to shell provisioner
8 years ago
Adrien Delorme 7c63c322c7 make provisioner/ansible/provisioner_test.go invisible to windows
8 years ago
Megan Marsh 1d1729a5ff fix powershell tests to use new command
8 years ago
Megan Marsh a81d18cdab explicitly use set-variable to work around a bug some users saw where the command invocation would vail
8 years ago
Poddo 72391f8f4d
Update provisioner.go
8 years ago
Megan Marsh 7597f609b1 update winrmcp vendor and update error message in file provisioner to aid user who messes up file path name. update file provisioner docs
8 years ago
Megan Marsh 3f8407d95f Revert "Merge pull request #6700 from hashicorp/multi_progressbar"
8 years ago
Adrien Delorme dfeca9f0df split progressbars per object
8 years ago
Megan Marsh a0edaf6c46 Going to revert this change for now, becuase of potential issues that arise from calling Prepare() twice
8 years ago
Adrien Delorme bb59a70e8f progressbar: use int64 instead of uint64
8 years ago
Adrien Delorme 5b66069da0 tests: remove Ui stubs to use packer.NoopUi to deduplicate code
8 years ago
Adrien Delorme 7efe3cac3d todos
8 years ago
Adrien Delorme 9b07d7670e use no ops for ansible ui & MachineReadableUi
8 years ago
Adrien Delorme fd7cb47adc use proxy reader for download progress & stop storing total/current in downloaders
8 years ago
Adrien Delorme ddd96c513b first draft at self refreshing loading bar centralized/controlled by Ui
8 years ago
Adrien Delorme 61480f41dc fix some go vet issues in tests ( composite literal uses unkeyed fields )
8 years ago
Megan Marsh 266a48a73a minor fixes for shell provisioner docs and logging
8 years ago
Megan Marsh ab13c73277 make varfile name unique and make sure to remove it from guest system if cleanup is true.
8 years ago
Megan Marsh 2c9a205f11 update shell provisioner tests
8 years ago
Megan Marsh cce13e3877 shell provisioner: add option to source env vars from a file
8 years ago
Megan Marsh b35acbd879 use statebag instead of SetSharedState for winRM password
8 years ago
Megan Marsh c51cd751d1 go back to using StartWithUI to prevent weird hangs during windows reboot
8 years ago
Megan Marsh 1f79b430ee
Merge pull request #6610 from hashicorp/filter_logs
8 years ago
Megan Marsh c1b50d365b
Merge pull request #5851 from arizvisa/multi-proto-progressbar
8 years ago
Megan Marsh 9fa47f5dad make windows restart provisioner work with ssh communicator
8 years ago
Ali Rizvi-Santiago cf9bbe3ecf Incorporated the hack demonstrated by @SwampDragons in order to deal with packer.rpc.Ui not exporting any information about what it's doing to anybody.
8 years ago
Ali Rizvi-Santiago 5726927cba Moved the progress bar out of packer.Ui and unlinked it out of all the packer.Ui implementations. Split up the terminal-related functions into a separate terminal.go and calculate the progress bar width by traversing through packer.Ui to avoid the issue with github.com/ugorji/go/codec serializing private members (or unsafe pointers) of structs. Shuffled some arguments around in getConsoleScreenBufferInfo in common/terminal_windows.go so that the interface forces the user to correctly declare a _CONSOLE_SCREEN_BUFFER_INFO type.
8 years ago
Ali Rizvi-Santiago 0f10032b3d Moved the progress bar from common to the packer.UI interface and refactored it so that the terminal width is calculated based on each interface which returns a custom progressbar specific to its ui.
8 years ago
Ali Rizvi-Santiago fd2fef8738 Added support for the progress bar to automatically determine its width using the minimum length from a packer.UI and the terminal dimensions via kernel32.GetConsoleScreenBufferInfo or an ioctl (TIOCGWINSZ) to "/dev/tty".
8 years ago
Megan Marsh ff6a039d5b replace scrubconfig with packer.LogSecretFilter.Set
8 years ago
Megan Marsh eb685b7140 remove duplicate code from chef provisioner
8 years ago
Megan Marsh a5a6b1ab58
Merge pull request #6501 from Wenzel/expose_ansible_packer_http_addr
8 years ago
Megan Marsh e146973d08 change implementation to set winrm password in way that matches powershell and shell-local implementations; sanitize logs
8 years ago
Mathieu Tarral 3450b6fd6f ansible: expose packer_http_addr extra var
8 years ago
Levi 6646d42490 updated function calls to include buildname and changed variable names
8 years ago
Levi 68ec630fde added function to retreive winrm password from commonhelper
8 years ago
Levi 636cec8f2b added commonhelper import
8 years ago
Levi 37fd50995f added parameter for setting packer password as env variable
8 years ago
DanHam 485d565e32
Ensure comments are easily readable in a standard terminal
8 years ago
DanHam e0bcba4913
Make the upload of env vars retryable in case of restarts
8 years ago
localghost e1a1bb522d Merge remote-tracking branch 'origin/master' into ansible_local_playbook_files_update
8 years ago
localghost 263a3c6910 Include some of the refactoring reverted by previous revert commit.
8 years ago
localghost 46a1c5d945 Revert "Unify handling PlaybookFile and PlaybookFiles."
8 years ago
M. Marsh 62e1323577
Merge pull request #5956 from hashicorp/dedupe_shell_local
8 years ago
localghost 6c7aa724eb Fix tests after merging with master.
8 years ago
localghost c33ca8ce64 Merge remote-tracking branch 'origin/master' into ansible_local_playbook_files_update
8 years ago
localghost 11f2b1ec24 Merge remote-tracking branch 'origin/master' into ansible_local_playbook_files_update
8 years ago
localghost 81db142c8a Unify handling PlaybookFile and PlaybookFiles.
8 years ago
M. Marsh abb70bfa80
Merge pull request #6215 from tb3088/delay-extraArgs-4462_clean
8 years ago
Matthew Patton d22fb6d60b reformat via gofmt
8 years ago
Matthew Patton 5c7d5fac75 expose OS-specific ModulePathJoiner
8 years ago
Matthew Patton 399edbe5e7 revert false economy WRT .ExtraArguments
8 years ago
Matthew Patton b505cecd98 sync docs to code
8 years ago
Megan Marsh 51bcc7aa13 add new feature for telling shell-local whether to use linux pathing on windows; update docs with some examples.
8 years ago
Megan Marsh e983a94a88 fix default windows bash call for shell-local provisioner and move chmod command from the execute_command array into the portion of code where we actually generate inline scripts, sparing users the need to think about this modification which Packer should really handle on its own
8 years ago
Megan Marsh 6dc4b1cbdc move all of the run commands for shell-local provisioner and postprocessor into common library too
8 years ago
Megan Marsh 926327beba deduplicate all validation and interpolation of the shell-local config, sharing options between shell-local provisioner and post-processor. Maintain backwards compatibility with shell-local provisioner.
8 years ago
Megan Marsh 616b41e58f deduplicate the nearly identical communicators for the shell-local provisioner and post-processor, moving single communicator into a new common/shell-local module
8 years ago
M. Marsh 23e51d21c2
Merge pull request #4300 from don-code/master
8 years ago
Megan Marsh fbbcbd772b remove file stat
8 years ago
Matthew Patton 735f5273a0 tab/space fixup via gofmt
8 years ago
Matthew Patton b2d78339b0 add missing removeDir() to allow StagingDir clean-up post-run
8 years ago
Matthew Patton 514a597825 alphabetize datastructures
8 years ago
DanHam 69ac7b56f6
Remove tmp files created by provisioner/windows-shell tests
8 years ago
DanHam b738f41efa
Remove tmp files created by provisioner/powershell tests
8 years ago
DanHam 70ccb8adff
Remove tmp files created by provisioner/puppet-server tests
8 years ago
DanHam fd07cfd2b1
Remove tmp files created by provisioner/puppet-masterless tests
8 years ago
Matthew Patton b4bec692ed remove accidental duplicate, initialize WorkingDir for puppet-server
8 years ago
Matthew Patton 47d46b0c64 use filpath() to make tests portable across Windows and non-Windows
8 years ago
Matthew Patton 8bb7798ea7 standardize across both puppet-{masterless,server}
8 years ago
Don Luchini edb845b3f4 Allow skipping Chef Client staging directory cleanup (fixes #3151).
8 years ago
Matthew Patton 5eb497a2c5 reorder terms and define an intermediate variable
8 years ago
DanHam 7cf31060eb
Remove script containing Win-Shell inline commands from local tmp when done
8 years ago
DanHam b9ab2c8048
Remove script containing PowerShell inline commands from local tmp when done
8 years ago
DanHam ccf687dac6
Fix tests
8 years ago
DanHam 5419375413
Change to CMD % style path is no longer required
8 years ago
DanHam 5b652316d9
Dollar's in env vars used in paths may cause problems for ssh
8 years ago
DanHam 4e7feea184 Allow users to specify the location that the env vars file is uploaded to
8 years ago
Megan Marsh 3afb243f11 use build name to ensure that winrm password and other shared state is not overwritten if two builders need the password in the same packer run.
8 years ago
M. Marsh 56dd8cdb63
Merge pull request #3891 from nouney/f-generated-files
8 years ago
Omer Katz c0719a3590
Allow using a custom inventory file.
8 years ago
Joshua C. Randall 406bf9c4aa override ansible executor inventory to use InventoryDirectory instead of InventoryFile when set
8 years ago
DanHam ef4817d644 Fix vertical spacing
8 years ago
DanHam 34db6c4ab1
Remove temp debugging output
8 years ago
Megan Marsh 072cd6b745
Merge pull request #5998 from hashicorp/do_5895
8 years ago
Megan Marsh 4e321b2dfa don't need to use a receiver with this function
8 years ago
Matthew Hooker 732a532d0e
pass file info during shell file upload
8 years ago
Megan Marsh ce1ab1f021 fix winrm password
8 years ago
Megan Marsh 559719020c use {{.WinRMPassword}} instead of some other weirdness
8 years ago
Megan Marsh d689e6b4d3 allow users of AWS to use the dynamically-generated admin password which we use as the winRM password as an elevated password in the Powershell provisioner, as well as an environment variable in same provisoner.
8 years ago
Megan Marsh 414dd80e61
Merge pull request #6013 from jsoref/spelling
8 years ago
Megan Marsh b33d6ce82e fix salt provisioner on linux
8 years ago
Megan Marsh e2f55a50b5
Merge pull request #5702 from brokenbot/salt-masterless-windows
8 years ago
Josh Soref 24b4c36fc9 spelling: function
8 years ago
Josh Soref b545c6f87e spelling: flattened
8 years ago
Josh Soref 04d6bfc696 spelling: environment
8 years ago
Josh Soref 684a3f5d8a spelling: custom
8 years ago
Megan Marsh f3a538db46 fix tests
8 years ago
Megan Marsh 3faf73b5f3 change backslashes to forward slashes in powershell provisioner; was breaking with cygwin
8 years ago
SwampDragons 7d9a86becb
Revert "Fix #5335"
8 years ago
DanHam 2d830d5d43
Auto escape chars special to PowerShell in user supplied data
8 years ago
DanHam aaf7102b9a
Tests for escape of chars special to PowerShell in user supplied data
8 years ago
DanHam a7b118ed94
Fix tests post changes. Add test for upload func.
8 years ago
DanHam 478589abec
Extend upload and subsequent 'dot sourcing' of env vars to std PS command
8 years ago
Marc Mercer d3c7d43f20
Small typo correction
8 years ago
Marc Mercer 5d67f77f43
Fixing 5852
8 years ago
Megan Marsh 974d9974fe add workaround for azure bug.
8 years ago
Megan Marsh addedbb680 Revert "Merge pull request #5515 from DanHam/dot-source-env-vars"
8 years ago
Megan Marsh 79fe900378 Revert "Merge pull request #5376 from DanHam/ps-escapes"
8 years ago
DanHam 7443adf2fd Simpler escape of chars special to PowerShell in user supplied data
8 years ago
DanHam 68e13c90b1 Revert "Escape chars special to PowerShell in user supplied data"
8 years ago
DanHam b67c64fd66 Tests for escape of chars special to PowerShell in user supplied data
8 years ago
DanHam f3c326bb3c Escape chars special to PowerShell in user supplied data
8 years ago
SwampDragons e56849c605
Merge pull request #5515 from DanHam/dot-source-env-vars
8 years ago
Matthew Hooker 9f87213ba4
tests and docs for #5831
8 years ago
Matthew Hooker 3127bfbcfb
Merge pull request #5831 from uShip/chef-client-policyfiles
8 years ago
Matthew Hooker aa76c47019
Merge pull request #5703 from frankdannhauer/5335
8 years ago
Evan Machnic 5cedfc4557 Fixed go format errors
8 years ago
Evan Machnic 7354247933 Added policyGroup and policyName to Packer Communicator
8 years ago
Evan Machnic fe90f79704 Changed new code to use tabs instead of spaces
8 years ago
Evan Machnic 1f92aa2c0a Added Policyfile support to chef-client provisioner
8 years ago
Matthew Hooker 4bccbbba1f
Merge pull request #5790 from GennadySpb/trusted_certs_dir
8 years ago
Matthew Hooker ebe995c0ff
run goimports
8 years ago
Gennady Lipenkov 53aaf84100 Support 'trusted_certs_dir' chef-client configuration option
8 years ago
Aidan Feldman b894c925d1
make user retrieval for Ansible provisioner more robust
8 years ago
Hunter Morgan 6410fd615c
typo
8 years ago
frankdannhauer 893d0334f1
Fix #5335
8 years ago
Dave Sanderson fc566a3cb4 Added test for new commands and guest os type
8 years ago
Dave Sanderson bf7a4b3363 remove erroraction on win removedir
8 years ago
Dave Sanderson 284b069003 Fixed stating of files on windows
8 years ago
Dave Sanderson 57770de36f revert file stat
8 years ago
Dave Sanderson a1ba4e5362 Silently continue on removeDir for Windows
8 years ago
Dave Sanderson 887b7dc476 Fix mixed case for mv
8 years ago
Dave Sanderson aee67d3933 Add ability to move files on remote system
8 years ago
Dave Sanderson 857e5d04d3 Fix command error for salt install
8 years ago
Dave Sanderson 666796e8eb Add ability to stat a remote path
8 years ago
Dave Sanderson 630b7466d6 updated test to remove old DefaultTmpDir reference
8 years ago
Dave Sanderson 0efda50354 Initial Windows support
8 years ago
Megan Marsh 19c997cb0e revert to using UI becuase the remote command syntax breaks things on linux with vmware fusion.
8 years ago
SwampDragons 753d3cf216
Merge pull request #5618 from kwilczynski/ansible-local-clean-staging-directory
9 years ago
Casey Robertson 8f02150178 Changes Linux install URL to omnitruck. Changes powershell install to use omnitruck rather than hard-coded 32-bit url
9 years ago
Krzysztof Wilczynski 10370adbab
ansible-local: Add ability to clean staging directory.
9 years ago
SwampDragons ce1f2457fd
Merge pull request #5563 from hashicorp/fix_5483
9 years ago
Megan Marsh c3cb7fe9f9 read from stderr so it doesnt lock up
9 years ago
Megan Marsh 9b1ae530c3 have separate stdout and stderr buffers
9 years ago