Skip to content
This repository has been archived by the owner on Apr 23, 2019. It is now read-only.

ssl configuration is only added to the nginx conf on second run after adding ssl_info to an app. #152

Open
berkes opened this issue Dec 19, 2014 · 0 comments

Comments

@berkes
Copy link
Collaborator

berkes commented Dec 19, 2014

Reproduce:

  • Deploy an app without ssl_info. Make sure there are no leftover certificate files on the server.
  • Add ssl_info with dummy strings for key and crt.
  • Provision the server.
  • Certificate files are now being generated on server.
  • Check nginx vhost, note it does not contain the ssl-blocks, yet.
  • Provision the server.
  • Check nginx vhost, it does now contain the ssl-blocks.

Problem is the :enable_ssl => File.exists?("#{applications_root}/#{app}/shared/config/certificate.crt")
part in the recipes.
When you run this before the parts where the SSL-files are being generated on the server, the enable_ssl will be false. It appears this line is evaluated/ran before the files are being generated. AFAIK chef will first compile the recipes and will then evaluate such lines. And only later on run the recipe as a whole.

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

No branches or pull requests

1 participant