Closed sunruh closed 8 years ago
Overall looks good -- would it be cleaner just to accept false
instead of comparing to -1 everywhere?
Reasoning is that you can change all those unless node['stash']['tomcat']['ssl_port'] == -1
to if node['stash']['tomcat']['ssl_port']
which is a little easier to read personally.
Changed the if
statements to check for false
status instead of comparing to -1
and rebased on top of current master.
Hi @sunruh,
Thanks for your contribution. Sorry for the late review since I was having problem on testing your pull request(#69)
I tried to use your PR to deploy the cookbook. But I am redirected to the https site. It is caused by this line of code https://github.com/humance/chef-stash-cookbook/blob/2ec8709c3c75b2078f73e13202ea31711e52ef69/templates/default/server-tomcat8.xml.erb#L80
You need to change it
--- a/templates/default/server-tomcat8.xml.erb
+++ b/templates/default/server-tomcat8.xml.erb
@@ -77,7 +77,7 @@
useBodyEncodingForURI="true"
compression="on"
compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript"
- <% if node['stash']['apache2'] -%>
+ <% if node['stash']['apache2'] && node['stash']['tomcat']['ssl_port'] -%>
redirectPort="<%= node['stash']['apache2']['ssl']['port'] %>"
secure="true"
scheme="https"
It may also affect this default
default['stash']['backup_client']['baseurl'] = "https://#{node['fqdn']}/"
any update on this? because without disabling ssl can't seem to get test-kitchen to run on ubuntu
bump
Allows to disable to the SSL configuration of Tomcat and Apache by setting the port attributes to
-1
.It is a replacement for PR #22 with the difference, that a34d15db1de390c4ece8ab94059d4f7f9ce5f419 (add proxy preserve host) has not been applied as it is unrelated to SSL (but important nevertheless).