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

# {{ ansible_managed }}
server {
{% for key,value in item.server|dictsort if key != 'file_name' %}
{{ key }} {{ value }};
{% if nginx_separate_logs_per_site == True %}
access_log {{ nginx_log_dir }}/{{ item.server.server_name }}-{{ nginx_access_log_name }};
error_log {{ nginx_log_dir }}/{{ item.server.server_name }}-{{ nginx_error_log_name }};
{% endif %}
{% endfor %}
{% if item.use_for_challenge is defined %}
location /.well-known/acme-challenge {
root {{ letsencrypt_challenge_webroot }};
}
{% endif %}
{% if 'location' in item %}
{% for location in item.location if 'location' in item %}
location {{ location.name }} { {% for key,value in location|dictsort if key != 'name' %}
{{ key }} {{ value }}; {% endfor %}
}
{% endfor %}
{% endif %}
}