1234567891011121314151617181920212223242526272829 |
- {% if ansible_controlled is defined and ansible_controlled != "" %}
- #
- # {{ ansible_controlled }}
- #
- {% 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 %}
|