Ask Your Question
2

Is there a CLI verbosity flag for `vagrant` that will automatically pass through to Puppet as --verbose/--debug?

asked 2014-02-09 00:53:07 -0600

mcandre gravatar image

I want to type something like vagrant -v up, and have the puppet provisioning automatically increase verbosity as a result, without requiring any extra settings or code in Vagrantfile.

Is there a builtin CLI flag for this in Vagrant, or am I asking for a feature that doesn't exist yet?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-02-10 17:37:44 -0600

nanliu gravatar image

updated 2014-02-10 17:40:23 -0600

Request a feature if you don't want to even create a Vagrantfile. I have to do something similar to pass in manifests file to be applied:

m.vm.provision :puppet do |puppet|
  puppet.manifest_file  = ENV['VAGRANT_MANIFEST'] || 'init.pp'
  puppet.options = "--modulepath '/etc/puppetlabs/puppet/modules:/tmp/puppet/modules'"
end

I think you can so something like the following if you don't want to edit the Vagrantfile every time for different options:

m.vm.provision :puppet do |puppet|
  puppet.manifest_file  = ENV['VAGRANT_MANIFEST'] || 'init.pp'
  puppet.options = ENV['PUPPET_OPTIONS']
end

and run:

PUPPET_OPTIONS='--verbose --debug' vagrant up
edit flag offensive delete link more

Comments

Thanks nanliu! I guess this is the best we can hope for until Vagrant adds a more built-in feature.

mcandre gravatar imagemcandre ( 2014-02-11 10:29:52 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-02-09 00:53:07 -0600

Seen: 379 times

Last updated: Feb 10 '14