Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a common debug flag envvar #10

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

patcon
Copy link
Member

@patcon patcon commented Jun 4, 2013

The debug output in kalastack seemed really useful:
https://github.com/kalamuna/kalastack/blob/2.x/Vagrantfile#L112

Thought it might be nice to have this extra provisioner output off by default, but enabled with a single command:
https://github.com/patcon/kalastack/blob/develop/Vagrantfile#L109
https://github.com/patcon/kalastack/blob/develop/Vagrantfile#L121

PR pending

chef.cookbooks_path = "chef/cookbooks"
config.vm.provision :chef_solo do |chef|
chef.cookbooks_path = "chef/cookbooks"
chef.log_level = :debug unless ENV['PROVISO_DEBUG'].nil?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was thinking about replacing

    chef.log_level = :debug unless ENV['PROVISO_DEBUG'].nil?

with

    chef.log_level = :debug if debug_mode?

And pulling the methods out into lib/priviso/helper.rb or something. I figure if we build this like a real ruby project (ie. a gem), we might eventually want to package it up as a CLI tool. Anyhow, that's definitely a larger point of discussion, but would anyone be in favour of making the code more self-documenting like suggested above, or would a lib/ directory be overboard?

@patcon
Copy link
Member Author

patcon commented Jun 4, 2013

Oh hey, this is just built on the puppet branch, since the future merge would have been messy. I can rebase after that's merged

@tizzo
Copy link
Member

tizzo commented Mar 24, 2014

@patcon any chance you could refactor since this is merged? ^^

@patcon patcon self-assigned this Mar 24, 2014
@patcon
Copy link
Member Author

patcon commented Mar 24, 2014

I think I could do that -- shouldn't be too bad :)

I've assigned it to myself for later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants