lib/vagrant-orchestrate/command/push.rb in vagrant-orchestrate-0.5.1 vs lib/vagrant-orchestrate/command/push.rb in vagrant-orchestrate-0.5.2

- old
+ new

@@ -25,15 +25,20 @@ # rubocop:disable Metrics/AbcSize, MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity def execute options = {} options[:force] = @env.vagrantfile.config.orchestrate.force_push + options[:provision] = true opts = OptionParser.new do |o| o.banner = "Usage: vagrant orchestrate push" o.separator "" + o.on("--[no-]provision", "Enable or disable provisioning. Default is true") do |p| + options[:provision] = p + end + o.on("--reboot", "Reboot a managed server after the provisioning step") do options[:reboot] = true end o.on("--strategy strategy", "The orchestration strategy to use. Default is serial") do |v| @@ -109,10 +114,10 @@ @env.ui.info(" -- Hosts: #{machines.collect { |m| m.name.to_s }.join(',')}") end ENV["VAGRANT_ORCHESTRATE_COMMAND"] = "PUSH" begin batchify(machines, :up, options) - batchify(machines, :provision, options) + batchify(machines, :provision, options) if options[:provision] upload_status_all(machines) batchify(machines, :reload, options) if options[:reboot] ensure batchify(machines, :destroy, options) @logger.debug("Finished orchestrating push to group number #{index + 1} of #{groups.size}.")