title: Multi-provision, multi-vm Vagrantfile vm filtering
body: <p>When provisioning for EC2, I only want the 'app' vm.  When provisioning locally, I want 'app' and 'pg'.  I'm having trouble writing a single Vagrantfile that can cater to both scenarios.</p>
  
  <p>I'd like to invoke this by just using a provider as a way to make it work:</p>
  
  <pre><code>vagrant up --provider=aws
  </code></pre>
  
  <p>vs</p>
  
  <pre><code>vagrant up --provider=virtualbox
  </code></pre>
  
  <p>AWS would spawn just app.  Virtualbox would spawn app and pg.</p>
  
  <p>I'm using vagrant 1.7.2</p>
  
  <p>I have something like the following Vagrantfile:</p>
  
  <pre><code>...
  Vagrant.configure(2) do |config|
      ...
      config.vm.define "app" do |app|
          # setup app here
          ...
          config.vm.provider :virtualbox do |vbox, override|
              # setup virtualbox for app vm here
              ...
          end
          ...
          config.vm.provider :aws do |aws, override|
              # setup aws for app vm here
              ...
          end
      end
      ...
      config.vm.define "pg" do |pg|
          # setup postgres here
          ...
      end
  ...
  end
  </code></pre>
  
  <p>Edit: clarified invocation.</p>