tknerr / vagrant-managed-servers

Enables Vagrant to ssh into and provision managed servers
MIT License
185 stars 30 forks source link

How do I set it up #10

Closed andheiberg closed 10 years ago

andheiberg commented 10 years ago

I can't seam to understand how I should set this up. I thought this would let me setup both my local environment and my local environment with vagrant up by only adding vagrant up --provider=managed. Is this incorrect?

I've added vagrant box add dummy https://github.com/tknerr/vagrant-managed-servers/raw/master/dummy.box

And added this to Vagrant file

    config.vm.provider :managed do |managed, override|
        managed.server = "hostname.com"
        override.ssh.username = "root"
        override.ssh.private_key_path = "~/.ssh/id_rsa"
    end

I then try to run vagrant up dummy --provider=managed

But this gives me The machine with the name 'dummy-vps' was not found configured for this Vagrant environment.

andheiberg commented 10 years ago

Think I fixed it with this in my Vagrant file

config.vm.define "local", primary: true do |local|
    local.vm.box = 'precise32'
    local.vm.box_url = 'http://files.vagrantup.com/precise32.box'
end

config.vm.define "web" do |web|
    web.vm.box = 'dummy'
    web.vm.box_url = 'https://github.com/tknerr/vagrant-managed-servers/raw/master/dummy.box'
end
tknerr commented 10 years ago

Closing as it was resolved and seems to be unrelated to vagrant-managed-servers