Playbooks to a new Lilik
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.

28 lines
791 B

  1. # {{ ansible_managed }}
  2. server {
  3. {% for key,value in item.server|dictsort if key != 'file_name' %}
  4. {{ key }} {{ value }};
  5. {% if nginx_separate_logs_per_site == True %}
  6. access_log {{ nginx_log_dir }}/{{ item.server.server_name }}-{{ nginx_access_log_name }};
  7. error_log {{ nginx_log_dir }}/{{ item.server.server_name }}-{{ nginx_error_log_name }};
  8. {% endif %}
  9. {% endfor %}
  10. {% if item.use_for_challenge is defined %}
  11. location /.well-known/acme-challenge {
  12. root {{ letsencrypt_challenge_webroot }};
  13. }
  14. {% endif %}
  15. {% if 'location' in item %}
  16. {% for location in item.location if 'location' in item %}
  17. location {{ location.name }} { {% for key,value in location|dictsort if key != 'name' %}
  18. {{ key }} {{ value }}; {% endfor %}
  19. }
  20. {% endfor %}
  21. {% endif %}
  22. }