Adopt Chef style guides
Internal cookbooks have grown and now they look like a mash of old/new and in-between styles.
I suggest we start adopting a style guide based on official guide at https://docs.chef.io/ruby.html#patterns-to-follow .
Rubocop is the first step #1892 (closed) .
We should also consider Foodcritic.
On top of that, we should add more best practices. This guide, https://github.com/pulseenergy/chef-style-guide, sums up pretty much most of the things I think we should start implementing.
For example, we should definitely start using private recipes to distinguish recipes that are used within other recipes.
Another thing I think we should enforce is not using node
objects in templates.
@gitlab-build-team What do you think? If we agree on a few common ones that would bring most value, we can start of simple and start adding the styleguide in this repository.