site.conf.j2 315 B

12345678910
  1. #{{ ansible_managed }}
  2. server {
  3. {% for v in nginx_sites[item] %}
  4. {% if v.find('\n') != -1 %}
  5. {{v.replace("\n","\n ")}}
  6. {% else %}
  7. {% if v != "" %}{{ v.replace(";",";\n ").replace(" {"," {\n ").replace(" }"," \n }\n") }}{% if v.find('{') == -1%};
  8. {% endif %}{% endif %}{% endif %}
  9. {% endfor %}
  10. }