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: Florian Pritz's avatarFlorian Pritz <>
parent 77c4e116
......@@ -40,6 +40,11 @@
- 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
- 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;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment