From 8bee75189866c361228e60eb5e9e694f16aa2efa Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 8 Aug 2014 17:40:07 -0700 Subject: [PATCH] commands/reload: show post-up message [GH-4168] --- CHANGELOG.md | 1 + plugins/commands/reload/command.rb | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 843cdbefd..bff5fbc92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ IMPROVEMENTS: Vagrant Cloud instance. [GH-4282] - core: File checksumming performance has been improved by at least 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] - guests/nixos: Added better NFS support. [GH-3983] - providers/hyperv: Accept VHD disk format. [GH-4208] diff --git a/plugins/commands/reload/command.rb b/plugins/commands/reload/command.rb index 1c27d817f..33a6f8e5e 100644 --- a/plugins/commands/reload/command.rb +++ b/plugins/commands/reload/command.rb @@ -33,10 +33,26 @@ module VagrantPlugins validate_provisioner_flags!(options) @logger.debug("'reload' each target VM...") + machines = [] with_target_vms(argv) do |machine| + machines << machine machine.action(:reload, options) 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 0 end