Closed niven01 closed 9 years ago
:+1: I like that you can how hand the resource a plain text cert from a string.
I just want to add that I'm conscious this is essentially a rewrite I've just landed on your lap. That wasn't my goal when I set out (although its mostly your code just moved around a bit)
Anyway, I'm not precious about this PR and if you are not happy with the idea of HWRP or want this to perhaps be split into smaller PR's let me know.
But of course this depends on if you agree with the idea of a custom
data bag type allowing the user to decide on data bag structure or to even pass it in in plain text if they want?
After sleeping on this I've had a total rethink on this PR and decided It's over complicated for what I'm trying to achieve.
I've rewritten it and currently testing so will submit a new PR
Hi,
I was in the process of writing my own certificate cookbook and one of my colleagues pointed me to yours. I believe he met you recently at a Chef summit or similar. He told me you were keen for the community to contribute.
I have a fairly large PR here with the sole goal of adding the option of a custom data bag. This allows me to handle how I store and retrieve the certificates. I have quite a few scenarios where there is a data bag structure that does not meet your cookbook requirements.
I've written this as a HWRP with multiple providers for each data bag type. I've moved some of the functions into helpers as well as the assessors determining where file should be placed. I've also moved the cert_path decision into a function in helpers.
Have a look and let me know your thoughts on this. I'm keen to keep on using your cookbook but I do need the flexibility of my own data bag structure.
The resource will be as follows:
I've also added a
remove
action to delete certificates