SSL certificate and key path to default.conf (#78)

* Fix example playbook section

* Add SSL certificate and key upload destination path to configuration file
This commit is contained in:
Dmitriy Skopintsev 2018-12-03 21:18:31 +06:00 committed by Alessandro Fael Garcia
parent 7670d11b1d
commit 92c154ff4b
2 changed files with 4 additions and 2 deletions

View File

@ -411,12 +411,14 @@ This is a sample playbook file for deploying the Ansible Galaxy NGINX role in a
port: 80
server_name: localhost
error_page: /usr/share/nginx/html
autoindex: false
web_server:
locations:
default:
location: /
html_file_location: /usr/share/nginx/html
html_file_name: index.html
autoindex: false
```
This is a sample playbook file for deploying the Ansible Galaxy NGINX role in a localhost and installing the open source version of NGINX as a reverse proxy.

View File

@ -17,8 +17,8 @@ upstream {{ item.value.upstreams[upstream].name }} {
server {
{% if item.value.ssl is defined %}
listen 443 ssl;
ssl_certificate /etc/ssl/certs/{{ item.value.ssl.cert }};
ssl_certificate_key /etc/ssl/private/{{ item.value.ssl.key }};
ssl_certificate {{ nginx_ssl_crt_upload_dest }}/{{ item.value.ssl.cert }};
ssl_certificate_key {{ nginx_ssl_key_upload_dest }}/{{ item.value.ssl.key }};
{% else %}
listen {{ item.value.port }};
{% endif %}