Saltstack Official Nginx Formula
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.

преди 9 години
1234567891011121314151617181920212223
  1. include:
  2. - nginx.ng.service
  3. {%- for domain in salt['pillar.get']('nginx:ng:certificates', {}).keys() %}
  4. nginx_{{ domain }}_ssl_certificate:
  5. file.managed:
  6. - name: /etc/nginx/ssl/{{ domain }}.crt
  7. - makedirs: True
  8. - contents_pillar: nginx:ng:certificates:{{ domain }}:public_cert
  9. - watch_in:
  10. - service: nginx_service
  11. nginx_{{ domain }}_ssl_key:
  12. file.managed:
  13. - name: /etc/nginx/ssl/{{ domain }}.key
  14. - mode: 600
  15. - makedirs: True
  16. - contents_pillar: nginx:ng:certificates:{{ domain }}:private_key
  17. - watch_in:
  18. - service: nginx_service
  19. {%- endfor %}