{% for php_pool_info in php_pools_infos.splitlines() %} {%- set phpversion = php_pool_info.split(',')[0] %} {%- set pool_name = php_pool_info.split(',')[1] %} {%- if phpversion == pool_version %} ; Auto generated config for Monitorix monitoring [{{ pool_name }}] pm.status_listen = /var/run/php/php{{ phpversion }}-fpm-{{ pool_name }}-{{ app }}-status.sock pm.status_path = /php-pool-status/php{{ phpversion }}-fpm-{{ pool_name }} {%- endif %} {% endfor %}