lib/vagrant-notify/action.rb in vagrant-notify-0.4.0 vs lib/vagrant-notify/action.rb in vagrant-notify-0.5.0

- old
+ new

@@ -50,9 +50,26 @@ end end end end end + + def action_status_server + Vagrant::Action::Builder.new.tap do |b| + b.use Call, CheckProvider do |env, b2| + next if !env[:result] + + b2.use PrepareData + b2.use Call, ServerIsRunning do |env2, b3| + if env2[:result] + env[:machine].ui.success("vagrant-notify-server pid: #{env2[:notify_data][:pid]}") + else + env[:machine].ui.error("No vagrant-notify server detected.") + end + end + end + end + end end end end end