data bags configurable as attrs and refactor some mysql blocks