ansible-role-nginx/templates/http/api.conf.j2
Alessandro Fael Garcia e80ab120b7 Add conditional check
This conditional ensures that the NGINX API will only be deployed if enabled
2018-04-05 14:50:53 -07:00

18 lines
279 B
Django/Jinja

{% if rest_api_enable %}
server {
listen 8080;
location /api {
{% if rest_api_write %}
api write=on;
{% else %}
api;
{% endif %}
}
{% if dashboard %}
location = /dashboard.html {
root /usr/share/nginx/html;
}
{% endif %}
}
{% endif %}