New version of salt-formula from Saltstack
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

27 行
946B

  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/{{ system.name }}.{{ system.domain }}.crt
  12. ssl_key: /etc/ssl/private/{{ system.name }}.{{ system.domain }}.key
  13. {%- else %}
  14. ssl_crt: {{ api.ssl.get('cert_file')|default("/etc/ssl/certs/"+grains.get('fqdn')+".crt") }}
  15. ssl_key: {{ api.ssl.get('key_file')|default("/etc/ssl/private/"+grains.get('fqdn')+".key") }}
  16. {%- endif %}
  17. {%- else %}
  18. disable_ssl: True
  19. {%- endif %}
  20. {%- if api.get('debug', False) %}
  21. debug: True
  22. {%- endif %}
  23. {#-
  24. vim: syntax=jinja
  25. -#}