Skip to content
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

Merged
merged 1 commit into from Sep 2, 2015

Conversation

Annih
Copy link
Contributor

@Annih Annih commented Sep 1, 2015

Hello,

I recently tested this cookbook on windows, it worked great once I fixed the key_dir and cert_dir attributes.
To be cleaner, I also provide standard default values for user and group.

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

@zuazo
Copy link
Owner

zuazo commented Sep 1, 2015

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]
Copy link
Owner

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 😢

Copy link
Contributor Author

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 ?

Copy link
Owner

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.

Copy link
Contributor Author

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.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ok 😉

zuazo added a commit that referenced this pull request Sep 2, 2015
Add default attributes to support windows
@zuazo zuazo merged commit b2ab2cc into zuazo:master Sep 2, 2015
@Annih
Copy link
Contributor Author

Annih commented Sep 2, 2015

Thanks for merging!
I just updated the branch with the documentation update... but I can see that it's to late =]

@zuazo
Copy link
Owner

zuazo commented Sep 2, 2015

Oh, sorry @Annih. Yes, I have updated the documentation myself because the change was simple.

@zuazo
Copy link
Owner

zuazo commented Sep 3, 2015

Released in 1.8.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants