Browse Source

Optional SSL certs

tags/0.4
Ales Komarek 8 years ago
parent
commit
bbd978cad7
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      salt/files/_api.conf

+ 5
- 0
salt/files/_api.conf View File

port: {{ api.bind.port }} port: {{ api.bind.port }}
host: {{ api.bind.address }} host: {{ api.bind.address }}
{%- if api.get('ssl', {}).get('enabled', False) %} {%- if api.get('ssl', {}).get('enabled', False) %}
{%- if api.ssl.engine == 'salt' %}
ssl_crt: /etc/ssl/certs/{{ system.name }}.{{ system.domain }}.crt ssl_crt: /etc/ssl/certs/{{ system.name }}.{{ system.domain }}.crt
ssl_key: /etc/ssl/private/{{ system.name }}.{{ system.domain }}.key ssl_key: /etc/ssl/private/{{ system.name }}.{{ system.domain }}.key
{%- else %} {%- else %}
ssl_crt: {{ api.ssl.get('cert_file')|default("/etc/ssl/certs/"+grains.get('fqdn')+".crt") }}
ssl_crt: {{ api.ssl.get('key_file')|default("/etc/ssl/private/"+grains.get('fqdn')+".key") }}
{%- endif %}
{%- else %}
disable_ssl: True disable_ssl: True
{%- endif %} {%- endif %}
{%- if api.get('debug', False) %} {%- if api.get('debug', False) %}

Loading…
Cancel
Save