Closed legal90 closed 8 years ago
:+1:
@legal90 PR is welcome ! It is good to have a breaking change before stash
4.0 big release. Thanks!
Not using the databag feature myself yet, but looks sensible!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
This PR contains a breaking change, so it can be merged only in the scope of major version bump.
1) Add attributes
['confluence']['data_bag_name']
and['confluence']['data_bag_item']
. Finally, they will be optional and users will be able to change data bag and item names.2) Allow to use as well as encrypted and not encrypted data bags regardless of Chef Client type. Breaking: In old Chef clients (< 12.0.0)
data_bag_item
method couldn't be used for encrypted data bag. So, in this case settings will be defined by attributes, not by data bag values.3) Use
confluence
nesting level in data bag instead of'local'
ornode.chef_environment
. At this moment it is not predictable - the library method tries to fetchlocal
nested dictionary if it is called by Chef Solo. Otherwise, it fetches dictionarynode.environment
. I suggest to use an explicit name,"confluence"
, which is the cookbook name. Also, it will be easier for users to understand how data bag values are overriding the appropriate attributes. The logic is: "If I want to override['confluence']['database']['password']
and['confluence']['database']['user']
via data bag, then I have to set these values on the same nesting level in the data bag". Example:Breaking: Those who use
confluence/confluence
data bag with this cookbook, will have to change the name of the nested dictionary from their current Chef environment to"confluence"
. If they still want to have environment-specific configuration, they can rename the data bag item to env name and then override this attribute:@racktear @Kasen @patcon Please, take a look. Suggestions are welcome!
@mvdkleijn @linc01n I'd like to suggest you to do the similar changes in JIRA and Stash cookbooks appropriately. I'm ready to send PR to your cookbooks if you don't mind.