{# Copyright (C) 2014-2017 Maciej Delmanowski <drybjed@drybjed.net>
 # Copyright (C) 2015-2017 Robin Schneider <ypid@riseup.net>
 # Copyright (C) 2014-2017 DebOps <https://debops.org/>
 # SPDX-License-Identifier: GPL-3.0-only
 #}
{% extends "upstream_default.conf.j2" %}
{#
#
#   ---- nginx upstream template for PHP5 websites ----
#
# List of parameters supported by this template:
#
#   - item.php5: ''
#       Partial name of the UNIX socket created by php5-fpm process to use in
#       the upstream configuration.
#
#}
{% block nginx_tpl_block_custom_upstreams                                         %}
{%     if item.php5 is defined and item.php5                                      %}
    server unix:{{ nginx_run_path }}/php{{ ansible_local.php.version|d('5') }}-fpm-{{ item.php5 }}.sock{% if item.enabled is defined and item.enabled == False %} down{% endif %};
{%     endif                                                                      %}
{% endblock                                                                       %}
