title: Vagrant execute command on specific guest after other guests are up
body: <p>I have the following Vagrantfile:</p>
  
  <pre><code>Vagrant.configure(VAGRANT_API_VERSION) do |config|
    config.vm.provider "virtualbox" do |vb|
      vb.memory = 1024
      vb.cpus = 2
    end
  
    config.vm.define :master do |master_config|
      master_config.vm.box = "centos/7"
      master_config.vm.host_name = 'saltmaster.local'
      master_config.vm.network "private_network", ip: "172.16.10.10"
      master_config.vm.synced_folder ".", "/vagrant", disabled: true
      master_config.vm.synced_folder "states", "/vagrant/states", type: "virtualbox"
      master_config.vm.synced_folder "pillar", "/vagrant/pillar", type: "virtualbox"
  
      master_config.vm.provision :salt do |salt|
        salt.master_config = "etc/master"
        salt.install_type = "git"
        salt.install_args = "v2016.11.7"
        salt.no_minion = true
        salt.install_master = true
        salt.verbose = true
        salt.colorize = true
        salt.bootstrap_options = "-P -c /tmp"
      end
    end
  
    config.vm.define :minion1 do |minion_config|
      minion_config.vm.box = "centos/7"
      minion_config.vm.host_name = 'saltminion1.local'
      minion_config.vm.network "private_network", ip: "172.16.10.11"
      minion_config.vm.synced_folder ".", "/vagrant", disabled: true
  
      minion_config.vm.provision :salt do |salt|
        salt.minion_config = "etc/minion1"
        salt.install_type = "git"
        salt.install_args = "v2016.11.7"
        salt.verbose = true
        salt.colorize = true
        salt.bootstrap_options = "-P -c /tmp"
      end
    end
  
    config.vm.define :minion2 do |minion_config|
      minion_config.vm.box = "centos/7"
      minion_config.vm.host_name = 'saltminion2.local'
      minion_config.vm.network "private_network", ip: "172.16.10.12"
      minion_config.vm.synced_folder ".", "/vagrant", disabled: true
  
      minion_config.vm.provision :salt do |salt|
        salt.minion_config = "etc/minion2"
        salt.install_type = "git"
        salt.install_args = "v2016.11.7"
        salt.verbose = true
        salt.colorize = true
        salt.bootstrap_options = "-P -c /tmp"
      end
    end
  
  end
  </code></pre>
  
  <p>Now after all the machines are up and running, I want to execute a command on the salt master using <code>master_config.vm.provision "shell", inline: "salt '*' state.apply"</code>. </p>
  
  <p>But the problem is, once Vagrant finished provisioning minion2, it can't access the master_config machine anymore. I think there should be a way to execute that command, without having to execute <code>vagrant ssh master -c stalt '*' state.apply</code>. I don't want to use a command on the host. And the highstate needs to be applied AFTER all the minions are up, due to some networking related configurations and states.</p>
  
  <p>Can someone help me out? </p>