9 Commits

Author SHA1 Message Date
hashicorp-copywrite[bot]
36a312ee26
add missing license headers and update copyright file headers to BUS-1.1 2023-08-10 21:53:25 +01:00
Seth Vargo
64ff69c64b Only run cleanup tasks when they are defined on the provisioner
This helps with some confusion caused in GH-2538, since the output says:

> Running cleanup tasks for 'shell' provisioner...

But that's actually not true. It is running the cleanup tasks iff the 
provisioner defined a cleanup task. This commit changes the 
provisioner_cleanup middleware to only run cleanup tasks if the subclass
defines a cleanup task.

The reason we can't just check if the provisioner `respond_to?` the
`cleanup` method is because the parent provisioner base class (which 
all provisioners inherit from) defines a blank cleanup method. This is
important because it means we never risk calling an unimplemented
cleanup function, and it also helps define the public API for a 
provisioner.
2015-11-26 13:11:51 -05:00
Seth Vargo
eac1960d45 Fix some Ruby 2015-11-19 10:25:32 -08:00
Mitchell Hashimoto
aad8e7f80d core: provision "once" or "always" [GH-2421] 2014-04-21 13:52:30 -07:00
Mitchell Hashimoto
4bc4317607 core: fix exception case regression from yesterday 2013-11-24 16:38:32 -08:00
Mitchell Hashimoto
0379853202 core: get rid of dependencies on @env from mixin 2013-11-23 22:05:59 -08:00
Mitchell Hashimoto
0e20c51c7f core: allow provisioner cleanup to happen after call 2013-11-23 16:37:18 -08:00
Mitchell Hashimoto
261d0ef6cd core: WaitForCommunicator - more robust wait for boot
This is a new built-in middleware that is more robust for
waiting for boots. The "max_tries" configuration is now gone, it is
timeout based. Future commits will make this even better as the
SSH communicator will implement the new "wait_for_ready" in a better
way.
2013-08-29 16:27:00 -07:00
Mitchell Hashimoto
d4c7e20110 core: ProvisionerCleanup task to run cleanup on provisioners 2013-08-29 11:13:43 -07:00