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

Is there a way to only create an entry if the cert exists? #1295

Closed
mcblum opened this issue Dec 28, 2018 · 2 comments · Fixed by #1296
Closed

Is there a way to only create an entry if the cert exists? #1295

mcblum opened this issue Dec 28, 2018 · 2 comments · Fixed by #1296

Comments

@mcblum
Copy link

mcblum commented Dec 28, 2018

How to reproduce (e.g Puppet code you use)

When using Dehydrated and Puppet Nginx, the Nginx config is updated before the cert files are there and Nginx crashes.

What behaviour did you expect instead

Not so much expected to see, but wondering if it's possible to check for the required files first, and only if they are there would we created add the Nginx configs.

Any additional information you'd like to impart

Thank you for working on this package!

@ekohl
Copy link
Member

ekohl commented Dec 29, 2018

I've submitted #1296 which I think would fix it. Can you verify this?

@mcblum
Copy link
Author

mcblum commented Dec 31, 2018

@ekohl woah did you do this for me? That's so kind, thank you. It looks like it would fix it? If I, for example, specify an ssl cert of /etc/letsencrypt/live/domain.com.pem or something and then have a location block with ssl_only => true, the script would first check if /etc/letsencrypt/live/domain.com.pem existed before it would add either the server or location to the Nginx config. Is that correct?

If so, then this is awesome! I'm using Dehydrated and not adding the config would basically make adding a new domain to the proxy and adding a cert for it a 10-15 line process.

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 a pull request may close this issue.

2 participants