12345678910111213141516171819202122232425262728 |
- {% if ansible_prolog -%}
- {% from 'templates/ansible/prolog.j2' import prolog with context %}
- {{ prolog() }}
- {% endif -%}
- {% if fpm_pools is defined and fpm_pools %}
- {% for pool in fpm_pools %}
- upstream fpm-backend-{{ pool }} {
- # Depending on the IP ensure that the same server will handle the request
- #ip_hash;
- {% for num in range(0, fpm_pools[pool].count, 1) %}
- server unix:/run/php/php{{ php_version }}-fpm-pool-{{ pool }}{{ num }}.sock;
- {% endfor %}
- }
- {% endfor %}
- {% else %}
- upstream fpm-backend {
- # Depending on the IP ensure that the same server will handle the request
- #ip_hash;
- {% for num in range(0, fpm_pool_count, 1) %}
- {% if ansible_lsb.major_release|int >= 9 %}
- server unix:/run/php/php{{ php_version }}-fpm-pool-www{{ num }}.sock;
- {% else %}
- server unix:/var/run/php5-fpm-pool-www{{ num }}.sock;
- {% endif %}
- {% endfor %}
- }
- {% endif %}
|