Skip to content
Snippets Groups Projects
Verified Commit 39aca49b authored by Florian Pritz's avatar Florian Pritz
Browse files

nginx: Add inventory_hostname vhost for SSL certs


This allows each host with nginx to easily get some kind of SSL cert
for testing purposes or services where the CN does not matter.

Signed-off-by: default avatarFlorian Pritz <bluewind@xinu.at>
parent 77c4e116
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,11 @@
notify:
- daemon reload
- name: install inventory_hostname vhost
template: src=nginx-hostname-vhost.conf.j2 dest=/etc/nginx/nginx.d/nginx-hostname-vhost.conf owner=root group=root mode=644
notify:
- restart nginx
- name: activate letsencrypt renewal service
service: name=certbot-renewal.timer enabled=yes state=started
......
server {
listen 80;
listen [::]:80;
server_name {{ inventory_hostname }};
root /srv/http;
include snippets/letsencrypt.conf;
location / {
return 404;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment