From 9f0efc19a910ac0368361a8b4ba2314e0f249b41 Mon Sep 17 00:00:00 2001 From: "A.J. Welch" Date: Wed, 19 Feb 2014 20:24:05 -0800 Subject: [PATCH] Fix "options are only allowed before install arguments" error. This reverts feb748f488 and 7cd7077467. `bootstrap_options` is meant for flag options such as `-D`. This is demonstrated in the example Vagrantfile from the original plugin: github.com/saltstack/salty-vagrant/blob/develop/example/complete/Vagrantfile Flag options must be appended to the options string before install args such as `install_type` and `install_args`. --- plugins/provisioners/salt/provisioner.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/provisioners/salt/provisioner.rb b/plugins/provisioners/salt/provisioner.rb index f1f83086e..f1052caa9 100644 --- a/plugins/provisioners/salt/provisioner.rb +++ b/plugins/provisioners/salt/provisioner.rb @@ -79,8 +79,13 @@ module VagrantPlugins def bootstrap_options(install, configure, config_dir) options = "" + ## Any extra options passed to bootstrap + if @config.bootstrap_options + options = "%s %s" % [options, @config.bootstrap_options] + end + if configure - options = " -c %s %s" % [config_dir, options] + options = "%s -c %s" % [options, config_dir] end if @config.seed_master and @config.install_master @@ -121,11 +126,6 @@ module VagrantPlugins end end - ## Any extra options passed to bootstrap - if @config.bootstrap_options - options = "%s %s" % [options, @config.bootstrap_options] - end - if @config.verbose @machine.env.ui.info "Using Bootstrap Options: %s" % options end