ansible-playbooks

another attempt to have everything organized ...
git clone https://git.e1e0.net/ansible-playbooks.git
Log | Files | Refs | README | LICENSE

https-host.conf.j2 (881B)


      1 server "{{ item.server_name }}" {
      2 	listen on {{ httpd_ext_addr }} tls port 443
      3 
      4 {% if item.server_aliases is defined %}
      5 {% for server_alias in item.server_aliases %}
      6 	alias {{ server_alias }}
      7 {% endfor %}
      8 {% endif %}
      9 
     10 	tls {
     11 		certificate "/etc/ssl/letsencrypt/{{ item.server_name }}/fullchain.pem"
     12 		key "/etc/ssl/letsencrypt/{{ item.server_name }}/privkey.pem"
     13 	}
     14 {% if item.hsts is defined %}
     15 	hsts {
     16 		max-age 5184000
     17 		preload
     18 		subdomains
     19 	}
     20 {% endif %}
     21 {% if item.no_logging is defined %}
     22 	no log
     23 {% else %}
     24 	log {
     25 		access "access.log"
     26 		error "error.log"
     27 		style combined
     28 	}
     29 {% endif %}
     30 
     31 {% if item.httpd_options is defined %}
     32 {% for o in item.httpd_options %}
     33     {{ o }}
     34 {% endfor %}
     35 {% endif %}
     36 
     37 {% for location in item.locations %}
     38 	location "{{ location.name }}" {
     39 {% for opt in location.options %}
     40 		{{ opt }}
     41 {% endfor %}
     42 	}
     43 {% endfor %}
     44 
     45 	root "{{ item.root }}"
     46 }