Sha256: 7f60f2198d9279efa1a46d61a6bc5639ad886dc2cab8a218231c4fc154f94ee4

Contents?: true

Size: 846 Bytes

Versions: 6

Compression:

Stored size: 846 Bytes

Contents

require "optparse"
require "vagrant"

module VagrantPlugins
  module Orchestrate
    module Command
      class Push < Vagrant.plugin("2", :command)
        include Vagrant::Util

        def execute
          options = {}

          opts = OptionParser.new do |o|
            o.banner = "Usage: vagrant orchestrate push"
            o.separator ""
          end

          # Parse the options
          argv = parse_options(opts)

          with_target_vms(argv, provider: :managed) do |machine|
            unless machine.name.to_s.start_with? "managed-"
              @logger.debug("Skipping machine #{machine.name}")
              next
            end

            machine.action(:up, options)
            machine.action(:provision, options)
            machine.action(:destroy, options)
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vagrant-orchestrate-0.0.6 lib/vagrant-orchestrate/command/push.rb
vagrant-orchestrate-0.0.5 lib/vagrant-orchestrate/command/push.rb
vagrant-orchestrate-0.0.4 lib/vagrant-orchestrate/command/push.rb
vagrant-orchestrate-0.0.3 lib/vagrant-orchestrate/command/push.rb
vagrant-orchestrate-0.0.2 lib/vagrant-orchestrate/command/push.rb
vagrant-orchestrate-0.0.1 lib/vagrant-orchestrate/command/push.rb