commands/reload: show post-up message [GH-4168]

This commit is contained in:
Mitchell Hashimoto 2014-08-08 17:40:07 -07:00
parent 04cea22c9e
commit 8bee751898
2 changed files with 17 additions and 0 deletions

View File

@ -12,6 +12,7 @@ IMPROVEMENTS:
Vagrant Cloud instance. [GH-4282] Vagrant Cloud instance. [GH-4282]
- core: File checksumming performance has been improved by at least - core: File checksumming performance has been improved by at least
100%. Memory requirements have gone down by half. [GH-4090] 100%. Memory requirements have gone down by half. [GH-4090]
- commands/reload: show post up messsage [GH-4168]
- communicators/winrm: Show stdout/stderr if command fails. [GH-4094] - communicators/winrm: Show stdout/stderr if command fails. [GH-4094]
- guests/nixos: Added better NFS support. [GH-3983] - guests/nixos: Added better NFS support. [GH-3983]
- providers/hyperv: Accept VHD disk format. [GH-4208] - providers/hyperv: Accept VHD disk format. [GH-4208]

View File

@ -33,10 +33,26 @@ module VagrantPlugins
validate_provisioner_flags!(options) validate_provisioner_flags!(options)
@logger.debug("'reload' each target VM...") @logger.debug("'reload' each target VM...")
machines = []
with_target_vms(argv) do |machine| with_target_vms(argv) do |machine|
machines << machine
machine.action(:reload, options) machine.action(:reload, options)
end end
# Output the post-up messages that we have, if any
machines.each do |m|
next if !m.config.vm.post_up_message
next if m.config.vm.post_up_message == ""
# Add a newline to separate things.
@env.ui.info("", prefix: false)
m.ui.success(I18n.t(
"vagrant.post_up_message",
name: m.name.to_s,
message: m.config.vm.post_up_message))
end
# Success, exit status 0 # Success, exit status 0
0 0
end end