My nginx ssl certificate and key is overwritten with empty contents by omnibus-gitlab 0.3.15 default.rb recipe.
I have been using omnibus-gitlab 0.3.7 with the following entries in a cookbook of my own:
node.default['omnibus-gitlab']['gitlab_rb']['nginx']['ssl_certificate'] = "#{node['openssl']['cert']}"
node.default['omnibus-gitlab']['gitlab_rb']['nginx']['ssl_certificate_key'] = "#{node['openssl']['key']}"
with the following settings in another recipe:
node.default['openssl']['cert'] = '/etc/ssl/certs/localhost.crt'
node.default['openssl']['key'] = '/etc/ssl/private/localhost.key'
This was working fine, but after having updated to omnibus-gitlab 0.3.15 the contents of /etc/ssl/certs/localhost.crt and /etc/ssl/private/localhost.key files, that I initialize in yet another recipe gets overwritten with empty content by the omnibus-gitlab default recipe.
I tried changing the following lines in the omnibus-gitlab/attributes/default.rb file:
default['omnibus-gitlab']['ssl']['certificate'] = ''
default['omnibus-gitlab']['ssl']['private_key'] = ''
to
default['omnibus-gitlab']['ssl']['certificate'] = ""
default['omnibus-gitlab']['ssl']['private_key'] = ""
and now I could cook my node successfully again.
I'm not fluent in Ruby, and I really don't understand why single quotes does not work and double quotes does. The empty? check should work for both, shouldn't it?