New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add default attributes to support windows #15
Conversation
Thanks @Annih! Please, can you add the Windows platform to the README and the metadata? |
@@ -39,6 +47,9 @@ | |||
when 'openbsd', 'freebsd', 'mac_os_x' | |||
default['ssl_certificate']['key_dir'] = '/etc/ssl' | |||
default['ssl_certificate']['cert_dir'] = '/etc/ssl' | |||
when 'windows' | |||
default['ssl_certificate']['key_dir'] = Chef::Config[:file_cache_path] | |||
default['ssl_certificate']['cert_dir'] = Chef::Config[:file_cache_path] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there no other directory we can use in this case? If the cache is erased, we lose the certificates 😢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use any directory of your choice, but as you may know Windows is not into storing system data in simple file, it would rather use the registry, etc.
There is no specific folder for storing certificate, except %SystemRoot%\System32\Certlog
when you have your own CA - but in this case you don't need this cookbook.
I think the most common use case on windows, is to generate the certificate then install it in the right store - using windows_certificate
LWRP for instance, so cache folder was good for me.
So ... as you wish, file_cache_path
or System32\Certlog
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% sure here, but I think using that Certlog directory sounds better than using an erasable cache directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I just checked and if you don't enable the CA role/feature, the Certlog
folder doesn't exists, which'll be a bit painfull to create - special case for windows.
If you are OK I'ld prefer keep the cache
folder, and any user can override the attribute to it's favorite place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ok 😉
Add default attributes to support windows
Thanks for merging! |
Oh, sorry @Annih. Yes, I have updated the documentation myself because the change was simple. |
Released in |
Hello,
I recently tested this cookbook on windows, it worked great once I fixed the
key_dir
andcert_dir
attributes.To be cleaner, I also provide standard default values for
user
andgroup
.Regarding the tests ... it's a bit hard for me to complete them, because I first need a public windows box for kitchen, then existing test recipes are combined with either apache2 or nginx.
I'm open to feedback, so let me know if you want more documentation/test, etc.
cc. @aboten