blob: 19cf542ea1544a08c6a1cd306ba9c3ff8dfa71b9 [file] [log] [blame]
{%- from "nginx/map.jinja" import server with context -%}
doc:
name: Nginx
description: Nginx is an open source reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer, HTTP cache, and a web server (origin server). The nginx project started with a strong focus on high concurrency, high performance and low memory usage.
role:
server:
name: Server
param:
version:
value: "{{ salt['cmd.shell']('which nginx >/dev/null && nginx -v || echo "Not installed"', python_shell=True)|replace("nginx version: ", '') }}"
bind_host:
name: Bind host
value: {{ server.bind.address }}
endpoint:
{%- for site_name, site in server.get('site', {}).iteritems() %}
{%- if site.get('enabled') %}
{{ site_name }}_{{ site.type }}:
name: {{ site_name }}
type: {{ site.type }}
address: http{% if site.get('ssl', {}).get('enabled', False) %}s{% endif %}://{{ site.host.name }}:{{ site.host.get('port', '80') }}/
protocol: http{% if site.get('ssl', {}).get('enabled', False) %}s{% endif %}
{%- endif %}
{%- endfor %}