saltstack-formulas / sysstat-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
5 stars 19 forks source link

Make the formula fully pillar driven/customizable #9

Closed puneetk closed 9 years ago

puneetk commented 9 years ago

Summary

I have moved the one sources file that was sitting in the root dir to the sources/ directory. I did this to bucket all source files, templates/otherwise in a separate directory from the state files that the formula provides.

iggy commented 9 years ago

I don't remember there being any discussion of changing foo-formula/foo/files to foo-formula/foo/sources, and I'm not a big fan of passing vars as context (as you end up with some complex formulas with context lists a page long) but that's just personal style. We aren't going to agree on everything.

Aside from that, it looks good.

puneetk commented 9 years ago

I don't remember there being any discussion of changing foo-formula/foo/files to foo-formula/foo/sources

I have moved the one sources file that was sitting in the root dir to the sources/ directory. I did this to bucket all source files, templates/otherwise in a separate directory from the state files that the formula provides. Sources as a bucket is better to represent that it the directory has templates and other files. Also sources doesn't interfere with tab completion when working in the formula dir.

I'm not a big fan of passing vars as context (as you end up with some complex formulas with context lists a page long)

I prefer it this way for separation of purpose, the state files use the settings passed form the map.jinja and any other logic and setup variables, and then template files are logic free.

iggy commented 9 years ago

My comment wasn't about why you moved the file. It was why you chose sources/ instead of the prevailing standard of other formulas and the SaltStack docs of using files/

iggy commented 9 years ago

Thanks muchly for fixing that.