Added role nginx/server

wip
Felix Stupp 5 years ago
parent 3f19422c0c
commit 0bec0a9630
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -0,0 +1,4 @@
# nginx Server Role
Defines a basic server role with a full custom set of directives for nginx.
Only requires / configures SSL with a certificate.

@ -0,0 +1,4 @@
---
dependencies:
- role: acme/certificate

@ -0,0 +1,10 @@
---
- name: Configure server for {{ domain }}
template:
src: server.conf
dest: "{{ nginx_sites_directory }}/{{ domain }}"
owner: root
group: root
mode: "u=rw,g=r,o=r"
notify: reload nginx

@ -0,0 +1,14 @@
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name {{ domain }};
ssl on;
ssl_certificate {{ acme_certificate_location }};
ssl_certificate_key {{ acme_key_location }};
include {{ nginx_snippets_directory }}/https;
include {{ nginx_snippets_directory }}/global;
{{ directives | indent(width=2) }}
}
Loading…
Cancel
Save