New version of salt-formula from Saltstack
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 8 година
пре 8 година
пре 8 година
пре 8 година
пре 8 година
пре 8 година
пре 8 година
пре 8 година
пре 8 година
12345678910111213141516171819202122232425262728293031
  1. {%- from "linux/map.jinja" import system with context %}
  2. {%- from "salt/map.jinja" import api with context %}
  3. rest_cherrypy:
  4. port: {{ api.bind.port }}
  5. host: {{ api.bind.address }}
  6. {%- if api.get('ssl', {}).get('enabled', False) %}
  7. {%- if api.ssl.engine == 'letsencrypt' %}
  8. ssl_crt: /etc/letsencrypt/live/{{ api.ssl.name }}/cert.pem
  9. ssl_key: /etc/letsencrypt/live/{{ api.ssl.name }}/privkey.pem
  10. {%- elif api.ssl.engine == 'salt' %}
  11. ssl_crt: /etc/ssl/certs/{{ api.ssl.get('name', grains.id) }}.crt
  12. ssl_key: /etc/ssl/private/{{ api.ssl.get('name', grains.id) }}.key
  13. {%- if api.ssl.authority is defined %}
  14. ssl_chain: /etc/ssl/certs/{{ api.ssl.get('name', grains.id) }}-chain.crt
  15. {%- endif %}
  16. {%- else %}
  17. ssl_crt: {{ api.ssl.get('cert_file')|default("/etc/ssl/certs/"+grains.get('fqdn')+".crt") }}
  18. ssl_key: {{ api.ssl.get('key_file')|default("/etc/ssl/private/"+grains.get('fqdn')+".key") }}
  19. {%- endif %}
  20. {%- else %}
  21. disable_ssl: True
  22. {%- endif %}
  23. expire_responses: {{ api.get('expire_responses', False) }}
  24. {%- if api.get('debug', False) %}
  25. debug: True
  26. {%- endif %}
  27. {#-
  28. vim: syntax=jinja
  29. -#}