-
Notifications
You must be signed in to change notification settings - Fork 29
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
Template supermarket json #6
Template supermarket json #6
Conversation
mode "0644" | ||
action :create | ||
notifies :reconfigure, 'chef_server_ingredient[supermarket]' | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please add newline to the EOF and then I'm 👍
The current implementation seems to allow you to place any attribute you want in the supermarket.json (for instance if you want to disable ['nginx']['force_ssl'] 😃), but the new template only supports a handful of config. |
@david-crowder your sentiments are why I'm hesitant to merge this. I also like the flexibility of the JSON output. @stephenlauck I'm worried that we'd be breaking a number of existing user's use cases like David's with this PR. How do you think we should proceed? |
I agree with the above and I think it's a good idea to just take whatever hash is assembled from the cookbook attributes/recipes and just drop the key value pairs into the template. I'll try to get to this or if @david-crowder or @irvingpop want to pair up and fix this let me know. |
@stephenlauck what's the advantage of doing that with a template vs just writing out the attributes to JSON like it's doing now? |
I was thinking that we may end up with a more complicated template like chef-server https://github.com/chef-cookbooks/chef-server/blob/master/templates/default/chef-server.rb.erb |
I still don't see how that's better :) |
I would like to manage the supermarket.json with a template instead of writing it out as a file. I am also not sure it's a good idea to do checking on the values and fail but better to just leave it to the user to make sure they populate the correct values.